LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send one command

I want to send command to serial , where i use switch and constant message.
When switch open i send one mess. , when switch clouse i send another mess. The problem, that i want to send mess. once (when switch just open/cloused), but if switch stay in this state, mess sends all the time.
I tray some logic circuit , but i not success to stop sending mes after one send.
 
 
0 Kudos
Message 1 of 9
(3,786 Views)
Assuming that the switch you are talking about is a front panel Boolean, you just have to use an event structure with a value change event. Do your case statement inside the event.
 

Message Edited by Dennis Knutson on 09-09-2007 08:54 AM

Message 2 of 9
(3,780 Views)
0 Kudos
Message 3 of 9
(3,748 Views)
0 Kudos
Message 4 of 9
(3,748 Views)

look pic first , tnx

Iff on/off press, sending mess1 once, iff on/off unpress, sending mess2.

In addition to mess1 & mess2 i have many another mess. All mess conect to " Concatenate string" , and always i send 1 mess to serial.

My problem, to build section that using on/off sending once mess1 or mess2 (and no allways).

Stop button stop runnig of system imedeatly in al cases.

I tray to use event structure, but not success/

0 Kudos
Message 5 of 9
(3,742 Views)

Why don't you post images of the actual block diagram instead of pictures you created?

The event structure is perfect for your application and if you can't get it to work, post the VI you've written so that someone can see what you've done wrong.

Message 6 of 9
(3,728 Views)
I attach VI file in 8.5 and jpg file of block diagram/
Download All
0 Kudos
Message 7 of 9
(3,696 Views)

Your VI is nothing like the example I posted. If you want to avoid doing a VISA Write with each iteration of the while loop, the VISA write should be inside the event like the image I posted. You also don't want the event structure inside a case statement and you certainly don't want two different event structures. You want the case statement inside the event structure, again like my example.

Look at the attached VI. It should be a lot closer to what you want.

0 Kudos
Message 8 of 9
(3,687 Views)
Great tnx to you!
0 Kudos
Message 9 of 9
(3,665 Views)