09-28-2016 05:25 PM - edited 09-28-2016 05:25 PM
I have a while loop, that has a visa write that sends a command x (does not need anythign appended to it to work with my device), then a visa read that reads the response. the response is two lines like:
sdfasd
sadfdfasdfasdfasdf
Takes a few seconds for it to write out the response as it does so one character at a time, maybe 1sec total. If in the visa configure block outside the while loop I turn termination chars to true the visa read works fine and reads the first line. If I turn it to false the whole thing freezes and times out. Shouldn't it just read everything based on how many bytes I told it to and skip over the carriage return in the response? Why doesnt it?
09-28-2016 05:44 PM
Well the application doesnt freeze, but it does pause on the visa read and it will pause there until it either gets as many bytes as you specify or it times out, whichever comes first. Can you provide some code?
09-28-2016 05:59 PM
sorry I can't provide the code at the moment, if i tell it to read one byte I get the same timeout error though.
09-28-2016 06:46 PM
It will be very helpful to have code. If there are no bytes at the port then it will timeout. How do you know there are bytes at the port when you perform a read?