Question: How to Sense if a device is connected or not.
rranchod
Junior Member
I'm trying to get status information on whether my projecter is online or offline. Offline being someone has disconnect the cable.
I tried using ONLINE: and OFFLINE: Syntax but that didn't seem to work. I then tried using a conditional statement but only the ONLINE: code worked. For some reason I cannot sense when the projector's RS232 cable is not connected.
Please see attached Test project file.
Help would be greatly appreciated as I have been trying for some time now and cannot seem to get this to work.
Thanks in advance...
I tried using ONLINE: and OFFLINE: Syntax but that didn't seem to work. I then tried using a conditional statement but only the ONLINE: code worked. For some reason I cannot sense when the projector's RS232 cable is not connected.
Please see attached Test project file.
Help would be greatly appreciated as I have been trying for some time now and cannot seem to get this to work.
Thanks in advance...
Comments
-
What kind of cable are you talking about. If it's power use a current sensor (PCS) if video use a video sensor (VSS). How are you connected and communicating with it IR or RS232. If RS232 you can poll it for status every x seconds or minutes or hours.
-
I'm controlling the projector via RS232: I think I was polling it correctly please review the file I attached. The problem I'm having is when it is connect I am getting notified. When the RS232 cable is unplugged I am not getting notified. Any suggestions?
-
The projector is not an "AMX device" as such. It does not go on and off line and provide notifications. The "AMX device" involved here is the serial port, and you will usually only see it go online after a reboot, and never go offline.
So you have to keep polling - asking the projector if it is still there, as vining said. Identify a command which provides some sort of status reply and send it every n seconds. If you don't get a reply, it's not there any more.
Note however that some projectors go dumb during their warm-up and cool-down cycles and might give a spurious lack of response. -
If you just want to see if it's plugged in and power is connected...
If the device holds CTS (DTE pin 8, DCE pin 7) high permanently as most serial devices do, then if you send the command 'CTSPSH' to the serial port, channel 255 wil give you the status of the port.
As a test to see if it works set the feedback to link with an IO, then watch the LED go on and off when you plug and unplug it.
Here's an exampe:DEFINE_DEVICE dvSERIAL_1 = 5001:1:1 dvIO = 5001:17:1 DEFINE_EVENT DATA_EVENT[dvSERIAL_1] { ONLINE: SEND_COMMAND dvSERIAL_1, 'CTSPSH' } DEFINE_PROGRAM [dvIO, 1] = [dvSERIAL_1, 255]You need to check that the pin stays high on system stanby.
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
