RS-232 with NI-700 ?
bob
Independent Programmer
Hi there
The RS-232 ports of the NI-700 are software programmable and each time the master is rebooted their setup get lost, so I have put the command
SEND_STRING dvSerialDevice1, "'SET BAUD 9600,N,8,1 485 DISABLE'"
in my STARTUP section of the program but it does nothing! When I telnet to the NI-700 and execute
send_string [dvSerialDevice1, 'SET BAUD 9600,N,8,1 485 DISABLE']
then everything is fine and the serial device can be controlled fine.
Do anyone know what I am doing wrong and how can I setup these ports permanently?
Many thanks!
The RS-232 ports of the NI-700 are software programmable and each time the master is rebooted their setup get lost, so I have put the command
SEND_STRING dvSerialDevice1, "'SET BAUD 9600,N,8,1 485 DISABLE'"
in my STARTUP section of the program but it does nothing! When I telnet to the NI-700 and execute
send_string [dvSerialDevice1, 'SET BAUD 9600,N,8,1 485 DISABLE']
then everything is fine and the serial device can be controlled fine.
Do anyone know what I am doing wrong and how can I setup these ports permanently?
Many thanks!
Comments
-
You need to use SEND_COMMAND rather than SEND_STRING. SEND_STRING sends the string 'through' the port to the device, whereas SEND_COMMAND will send it to the actual port (amx device).
Generally I put the baud rate setting in the online event of the device as well, just keeps everything a bit neater, also if you are using an external serial box it will ensure everything will always play nice.DATA_EVENT[dvDEVICE] { ONLINE: // Initialize coms { SEND_COMMAND dvDEVICE, 'SET BAUD 9600 N,8,1 485 DISABLE' } } -
Kim, thanks much!
-
it's important to do send_command for a device in the data_event: online rather than in define_start because the code in define_start typically runs before the devices are on line and a command sent to a device which is not on line will have no effect. Also, I think that the SET BAUD command should stick -- that is, if you set it correctly, it should stay set even through a power cycle. It's common to include a send command to SET BAUD in the online portion of the data_event anyway, even though it might not be technically necessary.
-
Harold, for some reasons the settings would not stick when I was setting the baud rate while in telent on the master. However I was using send_string there too... Switching now to ONLINE event and SEND_COMMAND. Thanks much for your help!
Edit: now it works as it should!
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums