Rodney Posted February 28, 2018 Share Posted February 28, 2018 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? Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted May 1, 2018 Share Posted May 1, 2018 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. Quote Link to comment Share on other sites More sharing options...
Rodney Posted May 1, 2018 Author Share Posted May 1, 2018 Thanks will give this a try Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.