sensors, actuators and modbus-rtu

Topics about the Hardware of Revolution Pi
Post Reply
vazkus
Posts: 3
Joined: 10 Mar 2017, 03:21

sensors, actuators and modbus-rtu

Post by vazkus »

Hi
I need to build a relatively simple setup consisting of 4 pneumatic actuators, 4 pairs of magnetic sensors and 3 stepper motors with drivers controlled by rs-485/modbus-rtu. I'd like to try Revolution-Pi for this project and I have a couple of questions:
1. From what I understand I will need the following modules: RevPi Core, RevPi DIO and RevPi Gate Modbus RTU Slave. Can you please confirm this is all I need to handle the abovementioned devices?
2. RevPi Gate Modbus RTU Slave: what does slave mean in this context? Is this in a sense that this is a slave to RevPi Core? I'm using OrientalMotor steppers/drivers and these drivers are basically modbus-rtu slaves, will the RevPi Modbus RTU module work with these?
3. Is there a sample (C/C++/python/whatever) code that shows how to communicate over RevPi Gate Modbus RTU? Does it appear as a serial device when connected to RevPi Core? If not, how can I communicate with it? Basically I need to figure out how to work with the stepper drivers.
4. Does the RevPi DIO module come with pairing connectors? Can you please let me know the type or part number of these connectors?

Thank you.
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41

Re: sensors, actuators and modbus-rtu

Post by volker »

Hi vazkus,
you will not need a Modbus Gateway and it would not work with your drives. Your drives are slave devices which need to be polled by a master device. As our Gateway is a slave device you would miss the master which needs to poll the slaves.
So you will need to wait some weeks until we release our Modbus master/slave software stack which is running on the Revpi Core and which is offering RTU over USB and TCP. As your drives are RTU you will need a USB to RS485 converter like the one we are selling in our shop (you will need the DIN rail type, not the dongle type as this is the only one of the two running with the stack).
RTU slave always (not just in this context) means the device needs to be polled by a master to exchange data with it. So you can never run a slave with a slave.
If you want to write your own controlling software and do not want to use the PLC software logi.cad 3 then you will need to understand the way we exchange data over the central processing image and how to configure this system by our PiCtory tool. Please read carefully all the Tutorials and you will understand how to write programs for reading and writing to the central process image and how to get the offsets of the IO data in this process image. The best sample code is the source code of "piTest" program which we deliver with the RevPi Core and which you can also download from this platform.
The DIO modules do come with all the connectors needed.
Unser RevPi Motto: Don't just claim it - make it!
vazkus
Posts: 3
Joined: 10 Mar 2017, 03:21

Re: sensors, actuators and modbus-rtu

Post by vazkus »

Hi volker,
and thank you for your quick and prompt response!
I know the modbus-rtu theory of operation, it just was somewhat logical to expect that such an extension module should run as master and not slave. And my interpretation of 'slave' was relative to RPi module, not modbus... (btw I'm not an expert in industrial automation, but isn't it a more typical usecase that the interface hooked up to the controller is master?)
Anyway, do you have an estimate on when the master modbus-rtu extension module you mentioned will be released? Can I use a 3rd part usb-rs485 module instead and then later switch to kunbus once it's available? Will it be drop in replaceable?
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41

Re: sensors, actuators and modbus-rtu

Post by volker »

hi vazkus,
you could try any USB to RS485 Adapter with the stack. But it happens that the small one we are selling e.g. does not run with the stack (at least up to now - we will try if we can find a work around for that problem). The other on we have in our shop does run without problems, so if your's will not run you might have an alternative to go for.
The TCP / RTU Stack for master and slave with configuration over PiCtory is already running. We just need some more time for testing and releasing and then it will be available (up to now our plans are to give it for free). Hannover Indutrial Fair (HMI) is the official launch for this stack, may be we are earlier but i can't promise.
Unser RevPi Motto: Don't just claim it - make it!
vazkus
Posts: 3
Joined: 10 Mar 2017, 03:21

Re: sensors, actuators and modbus-rtu

Post by vazkus »

Understood. Thanks again for quick response.

I have robotics background and lots of linux and stuff like that, but never done anything PLC. This seems to be an excellent platform for someone like me. Thanks for great job!
Post Reply