01-16-2013 10:46 AM
Hi,
I have a device which I have attached to my PC using a RS232 to USB connection. It is a 9 port pin serial push button type device. Pin 4 is the DTR with a resistor in the circuit. Pin 7 is the RTS with the switch, and Pin 6 is the DSR for the circuit.
I'd like to set the DTR to High, and set the RTS to low, and read the DSR state of the device in my Labview program.
What I'd like to build is a simple stopwatch in my program. This stopwatch should execute when the main program starts, and be continuously reading the DSR state of my com device. When it changes it should stop the stopwatch.
Can someone guide me with this?
I've attached my program thus far, and need some help. The program right is now is just executing vibratory motors through an Arduino MEGA.
Thanks!
Solved! Go to Solution.
01-16-2013 11:25 AM
*Update
So I was able to get it working to a point where Elapsed time shown stops and displays when the User pushes the switch.
I'd like to make the program more robust.
1.) How can I sync it so that the timer elapse stopwatch only begins when I select a value on any of the motors greater than 0 Hz at default? Then when the DSR state changes it will stop and show me a time?
2.) The use of multiple VISA devices makes it such that it takes a while before the motor actually starts kicking in the COM port for the Arduino, this is adding to the time that is being shown when the button is pressed. How can I optimize and remove this delay? Is it possible?
Thanks!
01-16-2013 02:10 PM
Few more updates...I'm not quite there yet..
What I need to do is make the program only record the time between when a motor comes on, and when the user pushes the button changing the DSR state to 'Unasserted'. I think this would affectively give me the reaction time it took between the two events...
Alternatively, I was thinking of perhaps having a separate elapsed time counter from the start of the button, and then stop and spit out the time it took for the motor to actually turn on (since there is a delay from when the program turns on to actually communicating with the device. So I need to effectively subtract this time out of the equation when the user is told to be ready and press the button.
Can someone please help me?
01-17-2013 04:29 PM
Hi fubag,
Currently the LabVIEW Interface for Arduino is only supported via www.ni.com/arduino. I recommend posting your questions on the discussion forums there; I suspect you will get more responses.
01-18-2013 01:50 PM
Thanks, I haven't had much luck getting responses from that Community Discussion form.
However, I think I solved my own questions, just needed extra time.