SP interval
frthomas
Posts: 176
in AMX Hardware
Hello,
The forum approved way of sending IR code is to use SP. I have code that does RESET IR, set CTON and CTOFF to 5 at ONLINE time of the IR device, and then later in the program I do stack 5 SP (i.e. 5 lines of SEND_COMMAND "dIR, blabla")
It works... but I get each pulse sent at 8 seconds interval, which is a bit long...
Before I do a time line or some other method to do that, since stacking pulse does not seem to work, anyone has an idea what I could be doing wrong?
Studio 2.4, NXI 1.0.22, NXC-ME 2.30.135
Thanks
Fred
The forum approved way of sending IR code is to use SP. I have code that does RESET IR, set CTON and CTOFF to 5 at ONLINE time of the IR device, and then later in the program I do stack 5 SP (i.e. 5 lines of SEND_COMMAND "dIR, blabla")
It works... but I get each pulse sent at 8 seconds interval, which is a bit long...
Before I do a time line or some other method to do that, since stacking pulse does not seem to work, anyone has an idea what I could be doing wrong?
Studio 2.4, NXI 1.0.22, NXC-ME 2.30.135
Thanks
Fred
0
Comments
The whole SP thing has always seemed like more work than called for or needed, IMHO...
- Chip
What are values of your CTON and CTOF ?
Vince
I still set pulse time at 2, and any button event for dvTPDSS (again, another unique port on TP) still gets PULSE[dvDSS, button.input.channel].
So, CTON 2, CTOFF 3 has worked for me for a number of components so far.
Bill
Oddly enough, making the CTOFF value too small sometimes makes the device less responsive. They are sensitive to the blanks in a transmission.
But I can't imagine where you are getting an eight second delay, unless that was a typo and you menat 8/10 (which is the default, as noted). I am willing to bet it's that firmware bug. Try starting your sequence with a CP (which clears the queue first) and see if that resolves it. If using CP breaks other things (clears the queue before all your commands are out) revert the firmware until AMX releases a fix.
I am with Chip on this one.
I have never had any issues with TO's and PULSES.
It is about as solid as you can get, and easy to implement.
When I find simple methods that work dependably, I try to
stick to them.
I use 5 for CTON and CTOFF. The pulses ARE sent, and I guess last 0.5 seconds. They do operate on the device correctly, although I am sure a smaller CTON would do it as well. But this is not my issue.
My issue is that there is 8 SECONDS (eight full seconds) between the pulses, with CTOFF set to 5 (which is normally 5 1/10th of seconds). Netlinx behaves like my CTOFF value was 16 times larger (i.e. set to 80).
From your posts, it all seems to indicate it should not work like that, hence my question, why does it? It also seems no one has seen this behaviour before...
Thanks
You can only set the pulse time globally for all pulses, which applies to relays and other channels as well as IR. That means if you have devices that require different timing, you have to track it all yourself. If using SP/CP, you set it per device, once, and you are done.
You can't queue a PULSE. If you are doing a sequence of IR commands, you have to make your own timing routines to keep them from stepping on each other.
I don't see a PULSE as a simpler solution at all, to me, SP is far easier to work with (firmware glitches notwithstanding).
For example:
SEND_COMMAND dvDEV,"'CTON',5"
Not
SEND_COMMAND dvDEV,"'CTON 5'"
As the later will be convert the ASCII 5 to it's decimal equivalent which is 53.