08-13-2023 07:28 AM
Hi
i am trying to use serial events to read serial data and when i run the VI the following error always appears.
could anyone help me
08-13-2023 08:10 PM - edited 08-13-2023 08:11 PM
@armma wrote:
Hi
i am trying to use serial events to read serial data and when i run the VI the following error always appears.
could anyone help me
Whew - that's like asking for a solution to "my car won't start". I think you should start by showing uploading the VI so we can take a look under the hood. Oh, and if you could upload the programming guide/manual that would be awesome.
08-13-2023 08:48 PM
@armma wrote:
Hi
i am trying to use serial events to read serial data and when i run the VI the following error always appears.
could anyone help me
What Events are you configured to wait for? VISA Configure Events is the function you would use to set Events that can be waited for. The exact list Events that can be waited on are bus specific. Most Serial instrument class devices support no writable events GPIB instruments support several depending on the IEEE 488 standard version they implement an some of those Events are optional and GPIB is a parallel bus. TCP/IP RAW and Socket classes support other events and IVI mixes some of everything you can never really use fully while interchanging devices.
08-14-2023 06:08 AM
I never had much luck with VISA Events. They just never worked with the setups I had as I expect other things to happen in the loop than just a simple read, such as being able to send commands. Instead of the VISA Events, use the Bytes At Port to see if any data is in the buffer. If there is, do a read. If not, have a short wait.
You may also find this helpful: VIWeek 2020/Proper way to communicate over serial