LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial port interrup, How can i do it?

i need to work whit the serial interruption, i need that labwiev do not stay waiting for a serial information, i need it keep making its work and if a interrup is ocured, it respond. HOW CAN I DO IT
0 Kudos
Message 1 of 3
(2,607 Views)
I believe the LabVIEW serial routines are interupt driven. When a byte is recieved, an interupt occurs, and the byte is placed in a buffer. I don't know of a way to hook into that interupt, but I think the simplest way to accomplish what you ask is to use the occurrence functions in the synchronization pallette. Set up one loop in parallel to your routine to monitor the serial buffer and to trigger an occurrence. See the occurrence examples as a reference.
0 Kudos
Message 2 of 3
(2,607 Views)
austinjim wrote:

> I believe the LabVIEW serial routines are interupt driven. When a
> byte is recieved, an interupt occurs, and the byte is placed in a
> buffer. I don't know of a way to hook into that interupt, but I think
> the simplest way to accomplish what you ask is to use the occurrence
> functions in the synchronization pallette. Set up one loop in
> parallel to your routine to monitor the serial buffer and to trigger
> an occurrence. See the occurrence examples as a reference.

Applications shouldn't and really can't directly use or interface to
interrupts on any Win32 system (Win9x, ME, NT, 2K, XP), Linux, MacOS X
and all other modern systems.

The low level driver responsible to control the serial port hardware
will do that. In your appl
ication you simply use the provided serial API
in LabVIEW (VISA, or if you are masochistic you can even call the Win32
Comm API with Call Library Nodes) to send out data and then you can
either invoke a read function which will return when the requested
amount of data has arrived or you can poll the number of bytes in the
receive buffer until you feel you want to read that buffer. This is all
there is to it and it seems very simple to me.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 3
(2,607 Views)