04-15-2014 05:28 AM
Hello all,
I am sending command to device through VISA write and read the value using VISA read with respect to command and again i want to send another command to device using VISA write and read the value using with repsect to the command in same port.
I could not able to clear the buffer after i read the data. even i was trying VISA flush buffer and VISA clear.
Please suggest me any solutions
Thanks in advance
04-15-2014 05:46 AM
04-15-2014 06:20 AM
No, It wont work
I had used the examples already
04-15-2014 06:38 AM
Hi Kumuch,
May be you need to check how many bytes are there at the serial port using the "bytes at port" property,based on that read the bytes instead of reading fixed number of bytes always and after that you may need to add some delay after reading the bytes..
Regards,
SrikrishnaNF
04-15-2014 07:05 AM
Is your instrument constantly sending data to you or only when you request the data? If it is on request only, then your buffer should be cleared each time you do a read (assuming you told the VISA Read to grab enough data). If your instrument is constantly sending data, then you need a second loop that does nothing but read and parse the data coming in.
04-15-2014 10:04 AM
Hi saikrishna,
Yes i tried, its varies with repsct to time which is given in between VISA write and read command. even I can able to get 4092 bytes i think so this is the maximum no of bytes to transfer through data serial communication.
04-15-2014 10:17 AM
hi crossrulz,
You are correct my instrument is sending data continously so that data is coming even i use the flush buffer but i have another command to stop the continous measurement. i used it and working fine Thank you..