LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best method to use a footpedal trigger on a com port?

I am trying to use a footpedal, through my PCs comm port, to trigger an event. I am having problems with it doing the task without pressing the foot pedal. Is there a good method for this?
0 Kudos
Message 1 of 3
(2,967 Views)
I'm not sure exactly what kind of signal your footpedal is relaying back to the PC, but setting up the logic in LabVIEW should not be too difficult.

By periodically reading from the COM port with LabVIEW's serial VI's, you can get the signal from your footpedal. Once you have that signal, you would compare it to your desired signal (the trigger condition) and use the output to control a case structure: true/false. If the trigger condition has been met, perform your task. If not, go back and read from the COM port again.

To summarize: Inside a while loop, read from your serial port, compare your signal to your trigger condition, and use the result of this comparison to drive a case structure. Good luck!
0 Kudos
Message 2 of 3
(2,967 Views)
1) Get a old keyboard,
2) determine which pins on the character generator are connected to the function key(s),
3)remove the character generator and keyboard cable (intact),
4) wire your normally open switch (footswitch) to the necessary pins and put it in a project box,
5) assign this function key to your "start test" button on your vi,
6) connect the keyboard cable on the project box to a keyboard splitter (y-cable);

when your vi is running and the switch is closed, it will have the same affect as pressing the function key on the keyboard ---triggering your vi to start


I've used this (very cheap and easy) technique several times. Most PCs can handle two keyboard input on the keyboard connection. However, three is often too many (i.e., barcode scanner, k
eyboard, and footswitch). I've wired the footswitch straight to the working keyboard in these cases so I can also use a barcode scanner with a keyboard wedge.
0 Kudos
Message 3 of 3
(2,967 Views)