Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

data acquisition and display

I use the VISA R to frequently read the position number of a step motor and show the position number on a number indicator. The frequency of reading is about one time per second( For some reason i couldn't increase the frequency). The problem is the position number as shown on the indicator is flash as 'number' '0' 'number' '0' 'number'. My question is how to remove this flash. and just let the  indicator show the position number?

 

Thanks.

 

Pingheng

0 Kudos
Message 1 of 3
(3,556 Views)

It appears that the instrument is returning something like “number 0” repeatedly. I would suggest that you use the string manipulation palette to only look at the number portion of the return string. You could then use the string to number conversion tools to turn that into a number and then update an indicator. It appears that your program is limited to once per second by the “wait until next ms multiple” VI that has a constant of 1000 wired to it. Did you get error when you reduced that number?

Matt
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,525 Views)

Pingheng,

        I have included a little example of what Matt was talking about doing. It is a simple string search for the numeric part of the returned position string. You will notice that I also set it up so you could pass the current position in so it was updated only when you had a valid response. You may have been getting 'empty' responses and these then cleared the display till your next valid response causing a flicker... make sure you are not getting an error from some of the read requests.

 

      Louis

0 Kudos
Message 3 of 3
(3,437 Views)