CreateProperty Component


Recommended Posts

Hi

I decided to start a new topic as this question is subset of my Current Component Name post

I have been trying to get this to work for a number of hours and now I am completely lost so I have set up a new file just to test

in my other post you said use CreateProperty() in onLoad - which I though I had done successfully but now I realise not

in the new file all I am trying to do is create a property called timerx and have knob1 set timerx =1 and knob 2 set timerx =2

please see attached screen shot

As my 2nd print ? "this is Knob1 after CreateProperty" has not printed I assume my line CreateProperty(timerz,100) has not run

My understanding is that by using createproperty() I can then have local variables for my timerx components once I set their values

I know this is a very basic question -  but just how is it done?

 

 

CreateProperty2.PNG

Link to comment
Share on other sites

  • 2 months later...

You are making a somewhat common error.  timerz as you have it without quotes is a symbol meaning it references a variable, channel or something else with that name.   In your case, it is probably NULL, which causes CreateProperty to fail.  You need to provide a string with the name of the new parameter, i.e.: createProperty("timerz", 100)

This may be a common error because there are a few functions that take symbols when really they should take strings, namely the begin/end functions, i.e. beginseq(), endseq(), etc.  This is left over from very old DAQFactory.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.