Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial interface with VISA event

hi,

i am new in labview utilisation, and i need to realise a small vi, witch read the frame in a buffer, do a treatment on it according to the HDLC protocol (terminaison character, transparancy, ...) and put the new frame in a dynamic list.

to do this, i need to use the VISA event, but i don't know how to use and configure this tool.

if someone can help me with some details of utilisation or give me a vi whitch use this tool in oreder to understand the fonctionnement, it would be great.

thanks a lot for your help.
++
0 Kudos
Message 1 of 2
(3,187 Views)
Hi,

With serial events, you can for example wait for a character to arrive on the serial port before reading it.

To configure serial events, you must use the NI-VISA Event Handling VIs. You can find this VIs on "All functions >> Instrument I/O >> VISA >> VISA Advanced >> Event Handling".

In a first time, you must configure the type of events that must be generated. Do this with "VISA Enable Event". Then you use the "VISA Wait on Event" VI to execute a portion of code when the event happened. Finally, disable the events by using "VISA Discard Events".

Attached to this thread, you will find an example which uses the VISA Event Serial Character (0x3FFF2035) to detect when a character is received at the serial port.
It sends a string with VI
SA Write and then waits for a response with VISA Wait On Event and reads a given number of characters.

Benjamin CHARLES
Applications Engineer
National Instruments France
0 Kudos
Message 2 of 2
(3,187 Views)