Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial send issue

I need to send a serial stream from a cRIO chassis, the problem I am having is that I need to send all 38,400 bits of the 38,400 bps stream but the VISA write vi seems to take a fraction longer than the required loop speed. I have a 10Hz loop and am sending 384 bytes per loop, obviously the loop has to happen in precisely 100ms to maintain the proper serial stream but the VISA write command takes between 100 and 103ms.

 

I came up with the 384 bytes number based off an 8 bit value plus 1 stop bit and 1 start bit so 10 bits per byte sent?

 

Any help would be appreciated.

0 Kudos
Message 1 of 4
(3,405 Views)

Hello, are you using a C series Serial module or the serial port on the cRIO controller?

National Instruments
0 Kudos
Message 2 of 4
(3,356 Views)

Some jitter on an asynchronous serial line is normal and should not hurt anybody.

In this case jitter always makes it longer between two sets of 10 bits.

Within 10 bits the stream is hardware timed.

greetings from the Netherlands
0 Kudos
Message 3 of 4
(3,339 Views)

 

Yup, the VISA command only directs the hardware of what it needs to execute, the overhead is associated with allowing that handling to occur.

Verne D. // Software R&D // National Instruments
0 Kudos
Message 4 of 4
(3,311 Views)