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