Home AMX User Forum AMX General Discussion

Camera control using PULSE

Eric/Dave:

Thanks for your advice on parsing data. I haven't had the chance to put it into practice yet, but I'm headed the right direction now. Eric - I'm a big fan of structures, so I had created a camera structure to contain my different parameter values. Hmmm...we think alike....big surprise.

All:
Now to the question at hand. I'm using the AMX module for the Cisco C90 codec, which includes camera control based on PULSE. The problem is the .5 second pulse is too long when I'm zoomed in. I need finer control than that, such as a .1 second pulse. I know that SET_PULSE_TIME is a global value, but could I (pseudo-code follows)

Push > set pulse time = 10
pulse to move camera (pan, tilt)
Release > set pulse time = 50

If this works I'd rather do that than parse the camera data, +/- 1 to the position, move the camera ... loop, loop, loop

Thoughts?

In searching the forums I saw references regarding setting times to CTON, but search in Netlinx keywords does not return such a command. What is CTON?

Thanks,
Norm

Comments

  • DHawthorneDHawthorne Posts: 4,584
    CTON is not a Netlinx keyword, it's a command to the IR port. You'll find documentation for it in the IR section of whatever controller you are using in AMX PI.

    That said, CTON and CTOFF do not work with the PULSE keyword. They work with the SP command, which you will also find documented in the IR section of the controller docs. You really, really want to use SP instead of PULSE for IR since, as you noted, the time for PULSE is global. CTON is per-port and you don't have to worry about putting your pulse time back for other devices, or making sure it is in effect when your actual PULSE occurs. You set it in the ONLINE event, and never have to worry about it again.
  • Dave:

    Thanks for the definition of CTON.

    Since I'm controlling the device through serial control / SNAPI / virtual device, I'm back to my original thought of setting the pulse time, moving the camera with finer control, then resetting the pulse time. Nothing else is being pulsed at the time of the camera move.

    I'd just add it to my code right now and test it, but there's a class going on.

    Hate to disrupt higher education with a system problem.

    Thanks,
    Norm
  • DHawthorneDHawthorne Posts: 4,584
    I was wondering what codec used IR :). If you are stuck with a virtual channel, you might get better responsiveness from ON and OFF on the channel if the module supports it. I can't imagine forcing PTZ control to use PULSE, but you would indeed be forced to it if that's how it's written, unless you roll your own.
  • ericmedleyericmedley Posts: 4,177
    Agreed,
    In my experience most camera ptz protocols (as well as AMX modules) kinda follow the idea of having a "Start panning/tiltling/zooming" "Stop panning/tilting/zooming" method. The idea is to let the user provide the start and stop times using their eyes for feedback on when the cam is in the right spot.

    So something as easy as...
     button_event[TP,Pan_Up_Button]{
      Push:{
        // send start panning up command
        // or turn pan up channel on
        }//push
      Release:{
        // send stop pan up command 
        // or turn off pan up channel.
        }// release
      }
    

    will work. This is just simple code for the exercise.
Sign In or Register to comment.