NI-2000 Serial Delay
cvpeck
Posts: 6
Hi all,
I'm attempting to insert a 50ms delay in my serial stream on my NI-2000 but am having no luck. A serial analyser shows the string is just going straight through to the device connected to the serial port. Can anybody assist me with finding what I'm doing wrong?
<code>
DEFINE_DEVICE
dvDMX1 = 5001:1:0
<snip>
SEND_STRING dvDMX1,"27,19,50"
</code>
I'm attempting to insert a 50ms delay in my serial stream on my NI-2000 but am having no luck. A serial analyser shows the string is just going straight through to the device connected to the serial port. Can anybody assist me with finding what I'm doing wrong?
<code>
DEFINE_DEVICE
dvDMX1 = 5001:1:0
<snip>
SEND_STRING dvDMX1,"27,19,50"
</code>
0
Comments
You could also try inserting the escape sequence for a break character to see if that works.
--D
Thanks, I will take a look. The timing isn't too critical; I just need to get my DMX lighting controller to time out on a batch data send so it goes back into receiving commands mode.
Thanks, that's what I thought. I'm relatively new to these devices so I assumed I'd bodged up the coding some how. Can you expand on the escape sequence recommendation? Not quite sure what you mean.
"If any of the character combinations listed below are found anywhere within a SEND_STRING program instruction, they will be treated as a command and not the literal characters.
Use the ESCSEQON and ESCSEQOFF NetLinx SEND_COMMANDs to control whether these are active or not. The ESCSEQON command must precede the Escape Sequences, otherwise the strings will be processed normally."
So it looks like you need to send the ESCSEQON command to enable the escape sequence to be detected.
--D
Thanks --D !
I missed that wherever it was buried away.
Can you just clarify what the "PI" is? I'm using the NetLinx Programming Language Reference Guide and the NetLinx Controllers WebConsole Programming Guide for the NI-2000 and neither of those seem to mention it. I think I may be missing a source of information.
Thanks Eric. Great resource. Can't believe I missed it.
Glad to be of service.