12-13-2019 01:03 AM
In MAX when I write the query then it return the expected value but it shows the time expired error. and In VI when I used the VISA Serial then it shows the insufficient location information error. Why this is occured?
12-13-2019 01:06 AM
Hi GAYATRI,
@GAYATRI_D wrote:
In MAX when I write the query then it return the expected value but it shows the time expired error. and In VI when I used the VISA Serial then it shows the insufficient location information error. Why this is occured?
Because you are doing something wrong in your VI and now you need to debug your VI.
If you would attach your VI there would be a higher chance of getting more detailed comments/help…
12-13-2019 02:37 AM
Here I attached the images of error occured in MAX and VI. If you see the capture2.png image the max return the value but gives timeout expired error. why this is happened?
12-13-2019 03:03 AM
Hi GAYATRI,
@GAYATRI_D wrote:
If you see the capture2.png image the max return the value but gives timeout expired error. why this is happened?
Because you are using "\r" as termchar, but VISA usually expects a "\n" (LF, hex 0A) as termchar: you request to read 1024 bytes, but only ~20 bytes are sent. So you get a Timeout as the requested number of bytes didn't receive in the timeout interval.
On the image of the VI: ALWAYS show the style indicator for string constants.
Are you really appending the CR char or did you append two chars "\" and "r"?
Why is there no error handling in the VI?
Why do you use BytesAtPort, which is wrong in 99.9% of all time?
Why do you wire default values at SerialPortConfig?
12-13-2019 04:01 AM
Hello Sir,
If I used the "\n" as termchar , then it could not return the expected value. Thats why I am using the "\r" as the termchar. And instead of 1024 bytes I used 30 bytes. but also the same problem occured.
On the image of VI: It gives the timeout expired error because of that I am using the BytesAtPort in VI.
12-13-2019 04:18 AM
If I am not using the Serial Port Configuration then also the same error occured.