Lacey Posted August 7, 2018 Report Posted August 7, 2018 I have three V430-J-RH6 PLC's, they will be communicating via RS-485. Each of these plc's are running two pumps for that specific unit. My end game is to make sure that none of the units have pumps running at the same time so we don't have power issues, ex. Unit 1 is running a pump so unit 2 and unit 3 cannot run their pumps until unit 1 is finished etc. I know how to program that part in but my struggle at the moment is with how to best get that information to each PLC. I need each PLC to have constant feedback of information from each other PLC. I need each unit to know when the other units are on and off. Is a struct command the best way to do this? If not what is, and how do I implement it? I have looked into the help files on Modbus master and slave for sharing information (read holding registers, and preset holding registers) but it doesn't look like they can share MB's between plc's? I also don't quite understand how those work. Any help in this would be greatly appreciated!! Thank you! Unit 1 Governor Pump_7.31.18.vlp Unit 2 Governor Pump_7.31.18.vlp Unit 3 Governor Pump_7.31.18.vlp
MVP 2023 Flex727 Posted August 7, 2018 MVP 2023 Report Posted August 7, 2018 MODBUS command #1 is Read Coils. Coils are MBs. Also, look into "Read/Write Mixed Data". It is unique to data exchange between Unitronics PLCs and is usually the simplest solution for exchanging data via MODBUS.
Lacey Posted August 8, 2018 Author Report Posted August 8, 2018 Thank you! I tried this using the Read/Write Mixed Data but it still is not working. I have uploaded the new updated programs, can you see what I am doing wrong? Also how do I know if communications is working correctly; is there a way to check it? Unit 1 Governor Pump_7.31.18.vlp Unit 2 Governor Pump_7.31.18.vlp Unit 3 Governor Pump_7.31.18.vlp
MVP 2023 Flex727 Posted August 8, 2018 MVP 2023 Report Posted August 8, 2018 I don't have time right now to go through all three programs in detail, but at first glance I'll say don't try to communicate on every PLC scan. Put a timer or SB 7 in front of the Read/Write Mixed Data block. There are example programs that came with your VisiLogic installation. Review the ones for MODBUS communications to learn proper technique.
Lacey Posted August 9, 2018 Author Report Posted August 9, 2018 I have attached a photo of my Master Main Routine. Does anyone see an issue with what I have here? It was partially working this morning and now it isn't working at all.
MVP 2023 Flex727 Posted August 9, 2018 MVP 2023 Report Posted August 9, 2018 You're still trying to communicate on every PLC cycle (for 100ms at a time). Try using a positive transition on SB 7 in rung 3 and a negative transition in rung 4.
MVP 2023 Joe Tauser Posted August 10, 2018 MVP 2023 Report Posted August 10, 2018 Your COM INIT and Modbus Config timeout is longer than your poll time. If you block gets an error you're not allowing it to "cool off". I'd stretch out the poll time to at least 5 seconds for starters and stagger the R/W block calls - don't tell the PLC to do more than one thing at once. Post one copy of your current code. Joe T.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now