10-05-2023 01:57 PM
Hi everyone,
I am using LabVIEW 2023 Q3 32 bits and I want to communicate with a COM port using the VISA functions. It used to work in the past but something may have changed and I can't figure out what.
When I use a VISA read command, I receive the correct answer from my instrument as long as I don' ask long databytes. I want to read 65536 bytes and I receive only 4096 whatever the timeout I put.
Solved! Go to Solution.
10-05-2023 10:47 PM
Please attach your code (in LV2019 or earlier) and more detail of your instrument to guide you better.
10-06-2023 07:30 AM
When I need to read more than 4k of data, I tend to read in chunks. This is simply a VISA Read inside of a FOR loop.
10-06-2023 07:51 AM
unfortunately, my LV code is only in LV2023 now.
10-06-2023 07:56 AM
My LV code worked fine in previous versions with 64 kB of data and it is not working well now.
The software dedicated to the instrument works fine but with LV I can address several instruments/motors... and make some scans.
Do we need to clear the buffer before addressing a new command ? I am wondering if remaining data in the buffer would cause my problems
10-06-2023 08:22 AM
@YvesM_91 wrote:
unfortunately, my LV code is only in LV2023 now.
All that you have to do is goto File menu, select save for previous version and select 19.0
https://www.ni.com/docs/en-US/bundle/labview/page/saving-for-a-previous-version.html
10-06-2023 08:41 AM
I hope it is ok now for reading in LV2019
10-09-2023 08:26 AM
Now I put a VISA I/O buffer to 65536 but the VISA read command does only read 3741 bytes (it should read 65534).
Why is so ?
10-09-2023 08:57 AM
@YvesM_91 wrote:
I hope it is ok now for reading in LV2019
You didn't attach anything
10-09-2023 08:57 AM
@YvesM_91 wrote:
Now I put a VISA I/O buffer to 65536 but the VISA read command does only read 3741 bytes (it should read 65534).
Why is so ?
Potentially the data contained the termination character and hence VISA treated the data is complete.