Code sends three IR Pulses, Controller only 2. Ideas?
tweekend
Posts: 15
Running the most basic of codes you could ever imagine, but having an issue where the controller doesn't seem to be doing what I think. And well, since the controller is smarter then me I must have fussed something up.
Trying to control a Gefen VGA 4x4 matrix switcher using IR. Basically when the a button is pushed on the Metreau keypad the NI-700 should send three IR pulses. But only two are being sent.
I have tried increasing the wait time between pulses. Even tried increasing the pulse time. Still, only two signals sent. Confirmed by the device only switching two outputs and the IR light on the controller only lighting up twice.
Here is a copy of the most recent revision:
BUTTON_EVENT [KP,5] (*Gefen guest computer input*)
{
Push:
{
SEND_STRING Proj,"Proj_VGA"
Wait 10
Pulse [geffen,2]
Wait 100
Pulse [geffen,6]
Wait 100
Pulse [geffen,10]
}
}
The first and third pulses are going through. The middle is not. And I have proved it isn't the middle one is bad as I have swapped 2, 6, and 10 around. The middle pulse is always the one lost. Again, the wait time between has been increased to an obscene number, I kept working it higher, to see if they were just to close together. No difference.
And yes I know, one two many F's in Gefen. Least of my worries right now. Ideas? Anyone run in to this before?
Thank you for reading and in advance for any thoughts.
Trying to control a Gefen VGA 4x4 matrix switcher using IR. Basically when the a button is pushed on the Metreau keypad the NI-700 should send three IR pulses. But only two are being sent.
I have tried increasing the wait time between pulses. Even tried increasing the pulse time. Still, only two signals sent. Confirmed by the device only switching two outputs and the IR light on the controller only lighting up twice.
Here is a copy of the most recent revision:
BUTTON_EVENT [KP,5] (*Gefen guest computer input*)
{
Push:
{
SEND_STRING Proj,"Proj_VGA"
Wait 10
Pulse [geffen,2]
Wait 100
Pulse [geffen,6]
Wait 100
Pulse [geffen,10]
}
}
The first and third pulses are going through. The middle is not. And I have proved it isn't the middle one is bad as I have swapped 2, 6, and 10 around. The middle pulse is always the one lost. Again, the wait time between has been increased to an obscene number, I kept working it higher, to see if they were just to close together. No difference.
And yes I know, one two many F's in Gefen. Least of my worries right now. Ideas? Anyone run in to this before?
Thank you for reading and in advance for any thoughts.
0
Comments
The second and third pulses are both being triggered after 10 seconds.
Bouncing between 5 different projects I missed that. I knew it would be something I messed up and completely idiotic.
Thanks and that works perfectly now.
This has caught everyone up at some point I'm sure. If you want to do this you need parentheses. A wait doesn't create a delay in code execution, it just schedules an event in the future so the second and third pulses are being scheduled at the same time, so it isn't working. Simply adding parentheses will fix it since they will then get scheduled sequentially rather than immediately.
Paul