data.text problem
Andre Silva
Posts: 19
Hi,
I'm trying to get my feedback from the devices i'm controlling (via Serial port) and for some reason my data.text never gets any value. I was using include files and tried to put all codes on the same file so i would be able to debug my code line per line but for some reason i couldn't. Also i tried to use create_buffer instead of the data.text to get the command feedback from the device (I'm using a AMX Module to control the device) and it also never gets any value.
I tried to reset the controller using the reset factory command and it didnt worked too.
Any more suggestions??
Thank you,
André Roberto da Silva
I'm trying to get my feedback from the devices i'm controlling (via Serial port) and for some reason my data.text never gets any value. I was using include files and tried to put all codes on the same file so i would be able to debug my code line per line but for some reason i couldn't. Also i tried to use create_buffer instead of the data.text to get the command feedback from the device (I'm using a AMX Module to control the device) and it also never gets any value.
I tried to reset the controller using the reset factory command and it didnt worked too.
Any more suggestions??
Thank you,
André Roberto da Silva
0
Comments
On the device notification options I tried to see all the strings and commands going and coming and still was not able to see the message: virtual device says:
The firmware of the master controller is updated to. Is possible that maybe this controller have a factory problem or something? I do have another controller on the smaller auditorium that I'm programming right now and I have the same problem there.
Thank you for the help.
a) Are you listening for the return strings on the physical device (5001:2:0)?
b) If you use "Create_Buffer", are you checking the buffer in the DATA_EVENT for the physical device (STRING event)? Or in mainline to see that it has data?
c) To check the Netlinx hardware, short the TX and RX pins together on the DB-9. Then anything sent will automatically be returned. This will indicate whether the hardware and cabling are working.
d) Does the device you are controlling require RTS/CTS? If so, it may not respond until you pull the RTS low. In these cases, it is usually good enough to short pins 7 and 8 together on the DB-9 (or other connector) connected to the device you are trying to control.
These are some possible causes that I can think of.
Are you using a Duet module? If so, you need to use the PASSBACK and PASSTHRU commands. Duet takes over the serial port and prevents NetLinx from even getting the notifications (on most modules).
Jeff
As mentioned in another commenter, there are things that can prevent strings from being properly processed and it's not impossible that you've got something goofy somewhere. Check the things about the duet modules (passback, etc) and make sure you've got a string handler in your data event or a properly configured buffer. Try RXON, also.
If you can't figure out the problem otherwise, my suggestion would be to clear out the program, or load a program with a data_event for just one serial port. Use that data_event to properly configure the serial port (in online: handler) and put a string handler in it which will put the data.text string into a buffer you can look at in debug. Then use telnet (available in Windows XP and elsewhere) to send strings to the connected device and watch for the response. In other words, go back to the simplest possible configuration where you know that you can send a device a good string and get a good response.
Oh, among other things, some equipment hooked to AMX serial ports will not work if pins other than 2,3,5,7, and 8 are connected. Make sure you don't have anything connected to pins 1,4,6, and 9 on the AMX end of the cable, including one of those goofy little null modem adapters.
Then there is the dead serial port issue. There have been recent threads about that.
Good luck with it.
Thank you all for the attention!