Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Xon Xoff speeds

I am using agilent multifunction DAQ card to send a digital signal output.

I have put the digital output vi inside a while loop and have given asmall delay of 1 msec(I have tried with higher delays also)

I am using Rs232.

 

The problem i am facing is at 9600 baud rate with flow control none the pgm works fine.

But when I set to higher baud rates flow control none does not work it shows some error like input buffer overflow in the agilent datalogger.

However at higher baud rates XonXoff  works without error.

 

I also wrote into a file the time and digital ooutput value.

The timing between two consecutive readings is not constant while using XonXoFF  it varies form 10 to 35 msec.

Can any one suggest  what can be done for higher baud rates and constant time interval between two actuations.

 

 

 

 

 

 

 

 

0 Kudos
Message 1 of 6
(4,184 Views)
A loop rate of 10-35 msec does not seem very high at all when you are using serial communication and also writing to a file. The variation is just normal jitter in a non-deterministic OS such as windows.
Message 2 of 6
(4,174 Views)

But the variation is less when flow control is set to none.The variation is high when set to XON Xoff why is it so?

 

Even though there will be variation in timing...which setting would minimize this variation?

 

0 Kudos
Message 3 of 6
(4,170 Views)
Xon/Xoff is a handshaking protocol and requires the instrument/controller to agree on when to send/receive data. You have more robust communication but the handshaking is going to take some time. Remove the file write from the code if you want an accurate timing of just the serial communication. Experiment with this.
0 Kudos
Message 4 of 6
(4,167 Views)

Thanks for the info..however I need to record the value finally in output file so cant skip that part.

maybe i can keep storing  in a program and at the end ot the program/loop i can write the whole array into a file.

 

0 Kudos
Message 5 of 6
(4,149 Views)

I agree with Dennis that on a Windows system your jitter numbers don't really seem out of line. At the same time, if you are seeing more jitter when using Xon/Xoff flow control, I would recommend using Rts/Cts flow control instead if it is supported by your instrument. When using Xon/Xoff flow control, it is likely that every incoming byte has to be looked at by the driver (depending on the hardware/driver implementation), causing a small amount of overhead when reading serial data. When using Rts/Cts, the flow control signal is signaled by asserting a line, so there is no need for the driver to scour all of the incoming data.

 

-Jason S.

0 Kudos
Message 6 of 6
(4,123 Views)