LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event handler switch creation (for repeated use )

Im creating a hyperterminal like application which reads from serial port and  writes into serial port.

The reading and writing works almost fine..I also wants to create some custom "Key controls" that will send some prestored commands to the serial port.

 

I currently implemented two commands "ESC" and "FLASH " in the Key controls menu..

I want to send these commands ESC and FLASH each time i click a button in the menu.

I used event handler for it..and put the event handler inside an always running while loop.

But the problem is I can send only these commands only for one time during execution.

Repeated pressing of switches doesnt cause any effects..

Can somebody help please???

 

Im using labview 6.1. If u modify VIs using higher versions i cant open here..kindly include a jpg screenshot inthat case.

Thanking you.

Stephen.

Download All
0 Kudos
Message 1 of 2
(2,646 Views)

events.pngHi Stephen,

 

in LV7.1 your events will be executed whenever I press one of the according switches...

 

Notes:

-Don't make several event structures. Instead make one event structure with several event cases. Read the context help for the event structure!

-I would suggest to set the mechanical action of both switches to "latch when pressed" instead of "switch..." to give a feedback to the user as the switch will be reset after reading it...

-Generally be more styleguide-conform! Use right-click on terminals to create controls/constants to avoid coercion dots (spot the red colored dots in the image?). Make error in/out in the lower left/right of the connector pattern. Avoid block diagrams larger than the screen (or what kind of monitor do you use?).

 

Edited:

Sorry for weird display. I have to get used to the new image gallery feature of the forum (and will use "image to the left" only on rare conditions). Btw. the preview looks different to the actual post Smiley Sad

Message Edited by GerdW on 05-28-2009 06:59 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,640 Views)