Shmeeps
I've followed every step to connect my Uno to Runtime and messed with every setting I can find to try and get it working but I just can't get the thing to connect. when I press the start plc button everything seems normal, but the program does not work on the uno and nothing in the monitor tab updates. I've watched videos of people doing it with ease, followed the steps they take exactly, and it will not connect. I have the blank prgaram uploaded to it with RTU selected, It's set to slave device 0, the baud rates are matching (along with every other setting), on runtime I've changed the number of available inputs and outputs and that does not make a difference. I've resinstalled all the software in case that's the issue. I'm at the point where I'm debating on buying a new uno and cable for it, although I doubt that's the issue considering I can upload a program to the arduino, monitor everything directly from the program in open plc, and everything works as expected. So I know the cable is working correctly. RMMS will not connect either, when I match all the settings correctly and press connect it just times out. I've also screwed around in the arduino IDE to reinstall my arduino firmware and make sure it's the correct version. It's driving me crazy, and for the first time in awhile, the internet does not seem to have what ever the solution I'm looking for is.
Reply 0 0
thiagoralves
If RMMS can't connect to the Arduino, then either it is dead or you haven't uploaded the right code to it. How are you programming it to be used with the OpenPLC runtime? Are you using the blank project? What does your Modbus settings look like? What is the compilation output when you upload that project to the Uno?
Reply 0 0
Shmeeps
From what I understand, I'm supposed to use the blank project while using Runtime and run the program through runtime, so that I'm able to use multiple slave devices at once if i want to. So, the blank project with a dummy input and output is what I've been transfering to the uno.
 
These are my communications settings when transfering https://imgur.com/a/xrxrDjH
 
This is the compliation output https://pastebin.com/zD41zkNX
 
I also have all the settings in the I/O config section as default, so that shouldn't be an issue.
 
From there, I believe RMMS should be able to connect to the uno and monitor the inputs and outputs, Although there isnt any I/O being used in the blank program, it should still just show 0's for all of them, and it doesnt update anything.
 
My settings in RMMS and the "Modbus message timeout" error are in an image in the imgur link.
 
Since it won't even connect to RMMS, it wont connect to Runtime either, but I'll put a picture of my slave device settings in the imgur link as well.
 
These are the Runtime logs after starting the PLC, in case that gives you any clues https://pastebin.com/eTSF0FKe
 
I've tried using the "Arduino Uno" option as the device type for the slave device in runtime to see if that works, and that has no effect. I've also adjusted the "size" options for the modbus I/O to see if it works using the minimum amount needed to run my program, and it actually worked one time. Then I updated the program and added an extra LED and all the sudden it stopped working again. Even after reverting my changes in the program and taking that LED out, it never worked after.
 
I'm not sure what I plan on making yet, but once I get this working I plan on figuring out how to connect the Runtime server to FUXA so I can make an HMI for what ever project I want. Im an industrial tech at a foundry and I deal with HMI's and all sorts of plc systems at work every day. I went to school to be a controls tech updating code and wiring diagrams and such, but ended up as a tech to start with. Sorry if that's too much info, I just love this crap, and the main point of trying to get this stuff running is to keep my "controls mindset" fresh until I end up in that position in the future. Thank you for the help, you're a legend.
Reply 0 0
thiagoralves
By default the slave id on RMMS is 1. Make sure you’ve changed it to 0 to be able to read the UNO’s IOs. Even without any tags and variables on your program, Modbus should respond just fine. Input registers and input status should reflect the actual readings of the UNO’s input pins
Reply 0 0
Shmeeps
I set it to device 0 on RMMS and it still does not work. But, it didn't time out this time, so that's a positive i guess
Reply 0 0
Shmeeps
I figured it out. I've been using regular addresses in my program instead of modbus addresses. that why it wouldnt connect to either. Thank you for the help, and keep up the hard work. This program is awesome
Reply 1 0
Reply