Hey all.
Trying to do 2 PLCs on FIO. Is it possible? Any guides / links? Cheers.
Hey all.
Trying to do 2 PLCs on FIO. Is it possible? Any guides / links? Cheers.
Hi factoryio2
Why do you want to make that connection? Is it for redundancy? Could you explain what you need to do to connect two PLCs to the machine?
Anyway, Factory IO doesn't allow switching its IP address, so I'm not sure if the simulator supports what you're trying to do. However, please describe your situation.
Regards.
Hello, thank you for your response.
The reason I am doing this is I am trying to create an environment where PLCs control different processes on the same production line. So it would not be for redundancy.
Kind regards.
Youâre welcome, no problemâŠ
The question is, why not do it all in the same PLC? Is there no room?
The normal approach is to have one master controlling several slaves, or several slaves controlling one master. Thatâs feasible, but using multiple PLCs to control the same process⊠I donât really understand it. It can be done, of course, but I donât see it as very useful.
At least thatâs my understanding. If you could provide an example, it would be clearer.
Regards.
I understand your concern here, and the fact that you are trying to apply logic to this situation haha. This is the same as what I would do if I was in your position.
What you are saying is correct, there is no doubt about it. However, I am just trying to do this for fun, and therefore I was seeking a way in order to do this.
I am also wondering if this is possible through the OPC UA protocol.
Please let me know if you know a way!
Kind regards.
Hi factoryio2:
I have no concerns. If you want to have fun, do it with real projects and using real, useful logic, and youâll learn useful things. But if you learn by doing useless and illogical things, you wonât learn anything.
On the other hand, if itâs possible, and with OPC UA (which Iâm unfamiliar with), itâs also possible, but I insist that what youâre trying to do isnât normal, and I recommend you abandon that learning path, as it wonât do you any good.
Iâll mention it again: why not do everything on the same PLC?
Regards
Here are my two cents.
Doing things âjust for funâ can be a very enriching experience. In this case, youâll learn what OPC UA really is and gain a much clearer understanding of its strengths, limitations and complexity. Thereâs nothing quite like getting your hands dirty to truly understand a technology.
In real industrial systems, itâs very common to have multiple PLC controlling different manufacturing cells. These PLC are typically connected using industrial network protocols (e.g. PROFINET or EtherNet/IP). From that perspective, what youâre trying to achieve makes perfect sense. Although, itâs definitely an advanced topic.
At the moment, Factory I/O v2 only supports one driver at a time. Using OPC UA or Modbus to exchange data between multiple PLC is a perfectly valid approach.
Hi factoryio2 and Bruno:
Here are my two cents.
Bruno is right, but itâs a very advanced level and I donât think it fits with what factoryio2 intends. In fact, Iâve already mentioned that itâs possible on all platforms, always with logic and purpose. This needs to be emphasized to students, telling them things as they are: if there are two PLCs, they must be interconnected with each other, using PROFINET, ETHERNET, or whatever, but they must be connected, never operating independently if they respond to the same process. Otherwise, itâs not feasible unless, due to system limitations, there are many inputs or outputs or something else that donât fit in a single PLC. Even then, they should be connected, at least minimally. Thatâs my opinion, which could obviously be wrong.
Contribution 108, which I just shared, is the final result of a project I did for fun using JavaScript. Iâll tell you about my experience with this project; youâre guaranteed to have fun and learn a lot.
Regards.
Hello:
Weâve raised the price by two centsâŠ
See contribution 109, which I just shared. The robot optimizes the pallets and sends them to the warehouse. The robot is controlled by one PLC and the warehouse by another, so there would be two independent PLCs for each part of the process. Now, if the robot sending the pallets fails, nothing happens because no pallets reach the second PLC; it simply doesnât store them. However, if the problem is with the warehouse PLC, then things change. The pallets accumulate, they have to be removed manually, their status recorded manually, and they have to be sorted manually. Therefore, two independent PLCs in the same process are not feasible.
Letâs use an analogy:
Two televisions in the same living room, side by side, one for watching sports and the other for watching series, isnât logical or coherent because both can be viewed on the same TV, unless thereâs a specific reason why it has to be that way, factoryio2 should explain that reason here, and then we can offer a more informed opinion.
Regards.
Here are my two cents ![]()
At the moment we are testing FIO with IEC 61499. In this approach, one of the key ideas is to distribute the control over several PLC. We use FIO as a Modbus server in this case, and it works fine.
Thanks a lot to all of you for the fantastic work you do with FIO !
Hi bernard.riera:
One video demonstrating what youâre talking aboutâŠthat way we can better understand what youâre trying to doâŠ
Regards.
Hello @amjavi6 and @brunovgr !
Thank you both for your contributions to this thread. The approach I took was utilising an OPC UA server of which shares the variables. (On CODESYS)
I now have a new problem: Delay. Changing the values inside of the proxy OPC UA server which both PLCs connect to is proving to be very slow. This is affecting my factoryio config, as it connects to the proxy OPCUA server I am using also.
Iâve attempted to update the polling rates, to no avail, and I still have this problem. Any advice or expertise on this manner?
Kind regards.
Factoryio2 ![]()
Hello factoryio2:
Everything happening simultaneously on your PC prevents Factory IO from executing everything it needs during a scan cycle.
There are some possible solutions that I usually apply in my scenes, but I donât know if they are viable in your case. I would need to see the scene to know if they are applicable or not.
On the other hand, itâs not the same to use intermediaries (OPC UA, platform HMIs, or SIM-type programs) as it is to do it directly. Watch this video from minute 15 onwards to see what happens. If you add more things, the communication will fail more and more frequently.
I should also mention that in reality itâs different, among other things because Factory IO and the SIM programs that act as intermediaries between the PLC and the simulation arenât present.
If you could show a video of your case, that would be helpful.
Regards.
Hello factoryio2,
Weâre going to work on a project based on your case. As I mentioned, itâs possible, but it canât be simulated in FactoryIO. Therefore, weâll do it in a very similar way that can be simulated. Weâll present the project in contribution 111 to the community. Feel free to comment with any suggestions, and weâll analyze them as we go.
I hope this one doesnât have the problem of delaysâŠ
Regards
Hi there,
Sounds interesting! How do you plan on simulating this?
Hi factoryio2:
Weâll simulate it so that each robot is controlled by a different PC and a common server for all three. What youâre suggesting would be each robot with its own PLC, but thatâs not possible because Factory.IO doesnât allow more than one PLC. In a factory or a real-world scenario, it might be possible, but not in Factory.IO.
In short: you want to do what you want, but instead of different PLCs, use different PCs. For project purposes, itâs almost the same.
Check out this video:
Regards.
Hi factoryio2:
The project is now complete in contribution 111. As you can see, there are no delays, and you can implement anything you can think ofâŠ
I invite the entire community to share any ideas they have about this project so we can analyze them, keeping in mind that Factory IO only allows one connection.
Regards
I have wanted to do this in the past as well (So many real world use cases), but have not had time to dive deeper in as I wished.
I was going to have a âMaster PLCâ that was going to connect with the FIO Driver with all the tags, and I was going to have the first network in OB1 run a function to setup the tags for the âSecond PLCâ. Then I was gonna use an iDevice connection to a 2nd PLC.
It was just a theory, I was hoping it wouldnât cause too much latency. Never tried it though.
Hi Justin Anderson:
Iâm not familiar with the iDevices system you mentioned, but I do know that if you put too many components between the HMI and the machine, youâll experience lag and freezing issues.
The closer everything is to the processor and the fewer obstacles it has, the better.
Regards