Troubleshooting Custom Module
gregr
Posts: 54
OK, my foray into modules is not going well.
I am trying to troubleshoot problems, and have already found that unless you pass variables into the module from the main code, you cannot watch them in debug.
So I should be able to do a SEND_STRING 0 from inside the module (inside the data_event for the virtual device) to test what is firing and what is not, right? No go. Neither diagnostics nor Telnet sees the message. Tech support confirms I should be able to.
Next I try turning on a channel on the virtual device from the module. Also cannot see the channel change status.
I know the modules are getting the commands, because I have those turned on for the virtual devices in Diagnostics, and they show up, and also in the case of one module that works, the real device fires.
Hope it's something simple!
Thanks in advance,
Greg
I am trying to troubleshoot problems, and have already found that unless you pass variables into the module from the main code, you cannot watch them in debug.
So I should be able to do a SEND_STRING 0 from inside the module (inside the data_event for the virtual device) to test what is firing and what is not, right? No go. Neither diagnostics nor Telnet sees the message. Tech support confirms I should be able to.
Next I try turning on a channel on the virtual device from the module. Also cannot see the channel change status.
I know the modules are getting the commands, because I have those turned on for the virtual devices in Diagnostics, and they show up, and also in the case of one module that works, the real device fires.
Hope it's something simple!
Thanks in advance,
Greg
0
Comments
I watch stuff in modules all the time in debug.
Here is the declaration from Main Code:
This is the part of the module where I'm trying to send messages back to the master. (This module seems to work, but I'm using it as a troubleshooting test for my other module which does not.)
I am both turning a feedback channel on and doing a send string in the second "ACTIVE" statement. Neither seems to work, although the projector is getting the command contained immediately after. I don't get it.
Eric, do I understand you to say that you watch module variables in debug?
I have attached entire files if that helps.
Thanks much!
Greg
The only thing I can think of is that the non-working module was missing the ONLINE_EVENT for the real device which allows the ONLINE variable to become true, forcing a repeating IP socket connection attempt. I then added it, but got the same symptoms until just now. Could the Master have become unresponsive in some way because of the repeated connection attempts, and stayed partially locked up for more than 2 hours?
Or maybe the process of eating lunch...Come to think of it, I did have to skip breakfast this morning...
Thanks for the offer of help, Eric.
Greg
even if "variable" is not populated "sending this" will always show up in diagnostics
if an event triggers it - push, online event, string event etc
sometimes buffer overflows(kind of like your temp internet files in web browser) and you may have to disable diagnostics or notifications, close window then reanable and you'll see them again
Well, it's possible, though I surely wouldn't recommend it. When a module is loading into the running code, each instance has it's variables and routines ID's with the instance name so the running program can tell one from the other. None of this is visible, to either you or to debug, it's all internal to the running code. So, with the same instance ID, you are basically going to have two modules doing exactly the same thing at the same time with the same data. I'm surprised the compiler allows it at all, though I imagine if you really tried, you could write one in such a way that it didn't barf.