LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing RS232 Send Command and DAQ

Hi everybody,
I am building a 3D Scanning Device. It uses a x-y Scanning Stage and a laser triangulation Sensor.
The Sensor signal is read via a USB-6211 DAQ Card. The Stage is adressed via RS232. The peak velocity of the Table is 36mm/s.
My Program does the following: Send a command to the table and start the measurement via the DAQ Card. The number of samples and the frequency is calculated so that the end of the measurement complies with the end of the movement. But even with the Rendezvous funtions i cannot sync the movement and the measurement properly.
Does anybody have an idea how to synchronize the measurement exactly (1ms) to the end of the RS232 send command?
Any hint is appreciated!
Greetings,
Jens
0 Kudos
Message 1 of 2
(2,881 Views)
That's a tricky one. I assume you are using Windows 2000 or XP?
The RS232 comms timing under windows can be very difficult to get millisecond accuracy with.

Even if you set your VISA write function to synchronous, it only waits for the message to get into the UART FIFO buffer, then moves on.

If you are only going to be using the COM port on the motherboard, you can usually disable the FIFO buffer...
In Device manager locate the COM port item you are using Eg. "Communications Port (Com1)"
Right-click on it and select properties, in the port settings tab click 'advanced' and uncheck the 'Use FIFO buffers' option.

Now the Synchronous VISA write function should wait almost exactly till the end of your RS232 send operation.

If you are using different RS232 hardware, you may not be able to control the timing any better than you already can.


Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2 of 2
(2,862 Views)