I've been trying to implement a fast VISA Serial Read function and ran into some issues. I decided to ask for help.
The structure is as shown in the .vi attached VISA configure, read in the while loop and close.
The transmission protocol is
4800 baud
8 bit data
No Parity
One stop bit
The data stream is formatted as follows:
Data is sent as MSB first with LSB last. The decimal point is assumed 4 places to the left of the LSB.
I am redaing the position from a two axis (coordinates) instrument as follows :
X :3.4528 LF CR
Y: 4.3476 LF CR
X: 3.4528 LF CR
Y: 4.3476 LF CR
The data is sent in the continuous mode. The "axes" is used for data identification.
The string functions are used to convert the string from the read
function into a DBL number.The problem is that I cannot utilize the whole speed of the instrument data, an update of 26-30 (X,Y) coordinates sets readings per second. The major problem is that from each port I read a set of x,y coordinates and there is no sunchronization of the message frames between the two ports. Instead of reading approximately 25 characters for all the coordinates ( 4 coordinates, x1,y1,x2,y2), I only read about 5-6 coordinates as I slow down the loop to read every 200ms. If I don't slow down the loop,coordinates are repeated and there are no more than 5 updates per second.
Please advise on this issue.
Thanks a lot,
Erol Nikocevic
Electrical Engineer
Electromech Technologies. # 316 941 0482.