06-04-2007 05:25 AM
So the difference is step 2... and then things work fine. Obviously, step 2 shouldnt't make a difference. It's just loading two extra scales, but in the end, the same scale is used...
06-04-2007 11:13 AM
I've written a very small test program, that illustrates the problem.
(Scales the same as above. Penny1:1 is a simple 1-to-1 scale. Thus slope 1, offset 0.)
Start at scale = 1:1, and increase the speed. This gives a error at value > 5, like it should. (Channel is limited to 5 Volt)
Switch to scale = Unidirect Speed. Because of the different scale, you should be able to set speed to 100, before reaching 5 volt analog output from the DAQ. However, you get an error at speed > 5. Although the channel reports the new scale, it doesn't seem to use it yet.
Now... Switch to scale = Bidirect Speed, and immediately switch to Scale = Unidirect Speed. Now, the scale works fine, and you can increase the speed above 5, like it should.
I don't understand it...
Attached: test vi and the used custom scales exported from MAX.
06-05-2007 01:29 AM
06-05-2007 08:14 AM
Oops... The vi was in a LVOOP class folder. Try it again, now it should open.
As for the min/max suggestion. The min/max values automatically rescale when selecting a new scale. As soon as I go from 1:1 scale (min/max 0 - 5 Volt) to the unidirectional speed scale, the min/max values I get from the channel property node immediately switch to approx. -110 Hz and +110 Hz. (minus indicates direction.) So that's correct. However, when I then give a value of, for example, 35Hz, the system responds that 35 is too high, because min/max are 0 and 5... So while the property node reports a physical min/max of 110Hz, the DAQmx write vi uses a min/max of 0 to 5 Hz. Physical values, not electrical!
If I then load the bidirectional speed scale, and then immediately load the unidirectional speed scale again, it does accept 35Hz as a valid value...