Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I synch a slow response data source to compare it to a time function?

I'm setting up a feedback loop to control a syringe pump. I have a desired function generator which continuously spits out desired pH for the current time (according to a selected function). I need to compare this desired pH to the actual pH from my pH meter but the meter has a slow response (supplying data only about once a second), Is there a way that I can only pull out a value from the function when the pH meter responds (such that the loop doesn't wait for a response from the pH meter)? I tried a delay but the response time doesn't seem to be uniform.
0 Kudos
Message 1 of 2
(3,168 Views)
Hey Peter,

A good method to use when you are dealing with slow serial data is the wait on event. You will need to specify the serial character to wait on. I have attached a small example to help illustrate this point.

I hope this helps out.

JoshuaP
National Instruments
0 Kudos
Message 2 of 2
(3,168 Views)