Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

problem in serial port reading

actually i am trying to establish communication between serial port and a power sensor which is of ophir make. now after learning from example i have established communication. i write SP(send power) then sensor transmit the value of power and i read it. now problem is that
1) i want to monitor power continuously because once i read the value again i have to transmit SP command for the new value. how should i transmit SP Command to serial port so that it always give me power value.
2) now i want to plot these value on the chart with data logging. how can i do this.

0 Kudos
Message 1 of 2
(3,235 Views)

Use a loop to request the power, wait to allow the instrument to repond, and then read.  This loop can keep running until you tell it to stop.

 

What language are you using?  In LabVIEW, I would tell you to use a Producer/Consumer to send the data from the instrument read loop to another loop that does nothing but log the data.  You can just use a chart directly for plotting.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(3,231 Views)