Activity Forums General Discussion Using X4 Pin Header (Relays) as Digital I/O?

  • Using X4 Pin Header (Relays) as Digital I/O?

     Johi updated 2 years, 9 months ago 2 Members · 2 Posts
  • AndreasK84

    Member
    July 9, 2021 at 9:36 am

    Dear Controllino Team,

    i have a controllino Mega and I need more Digital I/Os.

    Therefore i was wondering if i could use the X4 Header, which is mapped to the Controllino’s Relays, as a Digital I/O?

    Otherwise: What other options do i have?

    -Controllino Maxi Automation (16 DI, 8 DO) does not have RS485 so I can not connect it to Controllino Mega easily (I2C, SPI should not be used on ‘long’ cables due to EMC?) and i Ethernet might be too resource heavy because the contoller is also used as a stepper controller.

    – Controllino Maxi unfortunatelly only has 12 DI, but this might be my only option.

    Am i missing something?


    All in all I am very happy with your product, but i wish there where some DIO Modules for expansion.

    By the way: what would be the best way to connect two controllinos?


    Best regards

    Andy

  • Johi

    Member
    July 10, 2021 at 12:26 pm

    Hello Andreas,

    I read that you have a considerable distance between your controller and your IO.

    What you could do, that is use remote Modbus IO using the RS485 on your Mega.

    RS485 is the way industrial remote IO buses are built since decades (Profibus, with millions of nodes worldwide is in fact based on RS485, modbus RTU also runs on this hardware layer).

    There are many Modbus modules available that can be used for this (Chinese and others). A more simple solution, but more expensive in hardware could be to buy a second Controllino with RS485 port and use it as a remote IO.

    One remark though:

    The standard support RS485 as supplied with your Controllino is not the right way to go in your case.

    What is the problem: the problem is that as long as the cpu is sending traffic, it loops until all characters are sent out and then it disables /RE on the SN65HVD08 RS485 controller. (in a solution where you need to have full duplex communication between the controllers. This is the case in most cases.)

    The better way to do this is to let the interrupt hander that manages the serial IO manage this direction control as well. I have written the code to do this, and if interested, I will be happy to support you free of charge in this.

    You can do in fact the same using udp messages over Ethernet. UDP is also blazing fast, the disadvantage however is that Ethernet is more destined for HMI or data logging. Udp also runs over a separate processor, so there I would not be to afraid of delays if code is handled properly.

    John Gijs

    http://www.SylvesterSolutions.com

    • This reply was modified 2 years, 9 months ago by  Johi.
Viewing 1 - 2 of 2 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now