07-05-2011 07:42 AM
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.
Solved! Go to Solution.
07-05-2011 08:47 AM
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.
07-05-2011 10:01 AM
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.
07-05-2011 10:12 AM - edited 07-05-2011 10:13 AM
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.