Home AMX User Forum NetLinx Studio

IO Command

Hi
I am confused with IO Ports so please tell me What is the command(Syntax) to check the VSS2 to make sure the device(i.e DVD) is ON and how to turn it ON and OFF.

Comments

  • DHawthorneDHawthorne Posts: 4,584
    Let's say your VSS2 is connected to an NI3001. That would make the IO device 5001:17:0 (adjust this to whatever your controller actually uses for IO). Make sure it's defined in your device section, for the purposes of this post, lets say the definition is:

    dvIO = 5001:17:0

    To test IO 1, it's simply the value of [dvIO, 1]. If that resolves to true, the IO is detecting an input. so your code can say, IF ([dvIO,1] == TRUE) {<do something>}, or some prefer just IF([dvIO,1]) {<do something>}.
  • PhreaKPhreaK Posts: 966
    If the device you are controlling is an IR device you may also want to have a look at the 'SET IO LINK' command. This can be sent to the port you are using for it's control and greatly simplifies your power management. From AMX PI:
    "'SET IO LINK <I/O number>'"

    Link an IR or Serial port to a selected I/O channel for use with the 'DE', 'POD',

    'PON', and 'POF' commands. The I/O status is automatically reported on

    channel 255 on the IR port. The I/O channel is used for power sensing

    (via a PCS or VSS). A channel of zero disables the I/O link.





    Syntax:

    SEND_COMMAND <DEV>,"'SET IO LINK <I/O number>'"



    Variables:

    I/O number = 1 - 8. Setting the I/O channel to 0 disables the I/O link.



    Example:

    SEND_COMMAND IR_1,"'SET IO LINK 1'"

    Sets the IR_1 port link to I/O channel 1. The IR port uses the specified

    I/O input as power status for processing 'PON' and 'POF' commands.
  • prakashprakash Posts: 33
    Thank you all :)
Sign In or Register to comment.