
PneumaticKelly (Customer) asked a question.
I wrote this short program with the help of Interconnecting Automation a while back. They helped me set up the communication protocol between master and slave. I now want to add a second slave and possibly some additional inputs onto that slave with an input module. I have attached the original comm set up I am using but without any additional help I am lost. Interconnecting tells me they are booked up the next 3-4 months. I am looking for someone to help me understand if I need additional send receives in my program. I am connecting the slave I/O thru C100-108 and c200-206. my thought was to use C300 for the slave 2 inputs and C400 for the outputs.. I did not identify the slave as 1 just used an end rung for this. Watching a video it seems that I may want to change the slave ID to 0 not 2 and broadcast my send receive requests. Since there is more than 1 series of C coils to broadcast C100-108 and C300-308 do I need additional rungs to define what needs to go out and or received? I would appreciate someone spending time with me to learn the nuisances of setting up the comm for this. If it is too difficult to explain here, where can I turn to other than this blog?
Hi @PneumaticKelly (Customer)
The following post will go over the program and how to communicate to multiple slaves using Modbus on the Click PLC.
https://accautomation.ca/click-plc-to-stride-field-io-modbus-tcp/
You will notice that the success bit of the Recieve instruction is used to trigger the Send instruction and vice versa in your existing ladder code. Add additional Recieve and Send instructions using the success of the previous to trigger the next.
I would set the next slave to 2 as you indicated and continue cascading the instructions. Do not use the broadcast for communication.
Additional examples can be found on our website below.
I hope this helps you out.
Regards,
Garry
https://accautomation.ca/series/click-plc/
ACC Automation
Garry,
Can you write those first 6-8 lines needed to communicate with the 2 slave PLC's. I just don't get it.
I would gladly pay if needed. Can't find a local guy to work with in Chicago area.
I have sent you a message.
Regards,
Garry
The interlock logic you are using will grow with each new Send/Receive instruction and, in my opinion, will end up getting more confusing than it needs to be. I would take a different approach. Take a look at the attached screenshot. The example uses a single counter that increments each time the Port3_Ready bit becomes true. Each of the Send/Receive instructions are triggered based on the current value of the counter (0-4). After the last Send is complete and Port3_Ready becomes true again, the counter is reset to 0 and the cycle repeats. The setpoint of the counter just needs to be set = to the number of Send/Receive instructions in the project.
Thank you very much for this info. I also just found it in the Click manual 4-32. They add a timer to increment the counter. Is that necessary?
I am starting to understand it better. As everyone told me it is more complicated than I think.
My problem was that all my programs were single PLC's so all I needed to do was load the program. I now see there is the port set up required in each of my master and 2 slave PLC's .
I copied in your send receive code to my program and will be testing soon.
On the send receives there are; sending, success, error, and exception coils. Do I use those for anything at this time?
I hope these questions and answers are helpful to others as well.