03-28-2014 09:34 AM
Thanks for sharing the working example.
You do realize that with a simple build array on the scale constants and a couple of auto-indexing For Loops you could fit that Block Diagram into index card sized area right?
03-28-2014 11:01 AM
Yeah, I figured there was a cleaner way of doing that. I will epand my horizons and try to clean up my code with build arrays and for loops. Thanks for the suggestion.
10-18-2017 09:39 PM
I spent several hours struggling with this issue today, including trawling through pages of interlinked bits of NI documentation, before fortuitously stumbling across this post late in the day.
I can confirm that Tobin's workaround works, so thanks to him for taking the time to post it. It is now incorporated into my project.
I think this is a bug (needing to apply a different scale and then reapply the actual one; note that even simply reapplying the actual one has no effect -- it is necessary to apply an unwanted scale in order to get the expected functionality to take effect, otherwise LabVIEW just ignores the changes). If not a bug, it requires better documentation. The closest NI comes is with this note: Programmatically Query or Assign Custom DAQmx Scales in LabVIEW, which certainly implies that what we're trying to do should be possible when it says "The DAQmx Scale Node (DAQmx»Advanced»Scale Setup) is able to query and adjust properties of a custom scale. After you set the active scale, you can read or change properties of the scale such as slope, y-intercept, and description." At present, this simply does not function as implied by the code snippet (although that is regrettably only shown for reading the properties -- perhaps the best solution would be to add the equivalent code snippet for changing the properties to this document).
I note Jeff's suggestion that we need to use Save Scale, but no working example is supplied and my attempts to do this (by simply wiring the name of the edited scale into the ActiveScale property of the DAQmx»Advanced»I/O Constants»DAQmx Persisted Scale Property Node have failed in exactly the same way as doing nothing. I'm also not clear on why I would need to update a saved scale simply in order to change the properties of a scale being used by an existing task. I don't want to persist the scale beyond the end of the task. If there is a proper way to do this, I would be very pleased to learn how, but it seems to me this is addressing a different issue.
Thanks again to Tobin for enabling me at least not to end the day without a working solution!
10-19-2017 07:17 AM
scwimbush,
Thanks for your comments. It feels good to know I was able to help.
Tobin