Loading ...
Sorry, an error occurred while loading the content.

using input and output digital channels for DI148 and DI158

Expand Messages
  • abdulaziz_aydin
    Hello I would like to learn how can I use when one of the digital channel is input, the other one is output. I searched in ultimaserial web site and I found
    Message 1 of 2 , Nov 2, 2009
    View Source
    • 0 Attachment
      Hello
      I would like to learn how can I use when one of the digital channel is input, the other one is output. I searched in ultimaserial web site and I found some codes but it is not clear for me...

      I know following code line is used for that.

      ultimaserial1.SetDIODir(0);

      whats mean of 0. how does it express for digital channels I/O....?
      and for example, how can I appoint when digital channels 1,2 are input and 3,4 are output.

      thanks a lot for your support
    • ultimaserial
      See http://www.ultimaserial.com/standard.html#SetDIODir Each bit in the direction register controls the direction of corresponding digital I/O bits For
      Message 2 of 2 , Nov 2, 2009
      View Source
      • 0 Attachment
        See http://www.ultimaserial.com/standard.html#SetDIODir

        Each bit in the direction register controls the direction of corresponding digital I/O bits

        For example, bit 0 controls the direction of digital I/O 0, bit 1 controls the direction of digital I/O 1, bit 2 controls the direction of digital I/O 2...

        So to make digital channels 1,2 as input and 3,4 as output, you need to set digital IO direction register as 0011 (binary), or 3

        --- In ultimaserial_group@yahoogroups.com, abdulaziz_aydin <no_reply@...> wrote:
        >
        > Hello
        > I would like to learn how can I use when one of the digital channel is input, the other one is output. I searched in ultimaserial web site and I found some codes but it is not clear for me...
        >
        > I know following code line is used for that.
        >
        > ultimaserial1.SetDIODir(0);
        >
        > whats mean of 0. how does it express for digital channels I/O....?
        > and for example, how can I appoint when digital channels 1,2 are input and 3,4 are output.
        >
        > thanks a lot for your support
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.