WilliamFreb Posted November 17, 2010 Share Posted November 17, 2010 Hello, I want to set an integer value N at 1, 2, 3 ,..10 as a number of measurements, with a Knob. /Device=LabJackU3/ But in most cases it gives something around integer, for example: 1.8, 2.1, 4.2, 5.9 etc... And the sequence: while(N>0) beginexport(Data) delay(1) N=N-1 endwhile produces a different number of measurements, depending on where the Knob indicator is Link to comment Share on other sites More sharing options...
AzeoTech Posted November 17, 2010 Share Posted November 17, 2010 Use floor(n) to trim the decimal, or do floor(n+0.5) to round it, so something like: n = floor(n) while (n > 0) etc. BTW: make sure and use proper indentation in your script. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.