Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

is there "Bytes at Serial Port" interupt ??

Solved!
Go to solution

hello !

i am expecting to recieve specific number of bytes at serial port.

i can surely check "Bytes at Serial Port" within a loop, but, i do not want to do this in polling mode which consumes cpu.

i want to get an interupt (or event) that tells me that 24 byes has arrived at port.

how can i achive such thing ?

guy.

0 Kudos
Message 1 of 4
(3,232 Views)

You could use VISA events. You did not indicate which development environment you are using, but if it's LabVIEW then open the Example Finder (Help -> Find Examples) and you can find it. For example, if you search for "VISA" open the example "Detect Break Event". This shows you how to enable VISA events.

0 Kudos
Message 2 of 4
(3,229 Views)

yes , i'm using labview.

i know how to use visa events.

couldn't find an such event that waits for a specific number of bytes to arrive.

0 Kudos
Message 3 of 4
(3,224 Views)
Solution
Accepted by hookso

You can use the "Serial Character" event. This will trigger when at least one character arrives at the serial port. You can collect the characters in a loop until you get 24. There is no specific event for 24 characters.

0 Kudos
Message 4 of 4
(3,221 Views)