I am trying to connect my eTop407 Pannel to another PLC from the CoDeSys 2.3 software over ModBus Tcp.
I have seen that EXOR have made a function for this matter, but i cant get it to work. Do anyone have an example or a guide for this operation?
Im using the the EXOR_ModbusTCP.lib
I'm a new programmer and therefore it would be a big help if anyone have a functional program i could look at.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thaks for the reply
I think I know what you mean now.
But it sounds most like when you import tags in the HMI software. Correct me if wrong.
What I want is
1: I will connect the internal PLC(Running CoDeSys) in the panel with an external PLC(Running another software then codesys) over Modbus TCP / IP.
The external plc who run the slave operation, and which I have verified that I can get in touch with over Modbus TCP via a Windows program.
2: I want to do so that I can get the internal PLC in the panel to control the external PLC.
3: I want to read the input/output status of the external PLC, or at least be able to access some memory areas, for example the 40000 area and read / write in them.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There we have no experience with EXOR but I have done Modbus/TCP with Moeller XC201 controller.
One side of this like will be master and the other slave (server). The slave side is usually more complicates because that is where more data handling is needed. For either case in the Moeller you needed a data array of Words to hold the information.
For a master, They have a Modbus_Setup function block that will establish the communication socket. Then the master uses MB_Read and MB_Write function blocks to move the data. The master can choose to run these all the time (trigger again after they are done) or just wham it needs to.
Foe a slave, the controller has to continuously run a function block that looks for connection requests, parses the Modbus messages and reacts to the Modbus requests from the master and send replies back. That is why the slave (server) side is more complicated.
If your external PLC can be set up as a slave easily, I would do that. Many PLCs have this built in so you don't have to mess with it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi developers
I am trying to connect my eTop407 Pannel to another PLC from the CoDeSys 2.3 software over ModBus Tcp.
I have seen that EXOR have made a function for this matter, but i cant get it to work. Do anyone have an example or a guide for this operation?
Im using the the EXOR_ModbusTCP.lib
I'm a new programmer and therefore it would be a big help if anyone have a functional program i could look at.
Thanks
I thought had a CoDeSys driver where you could just read in the symbol file and go...
In that case there would be no need for the Modbus.
What do you mean? I do not understand it completely.
Do you have a driver that can read Symb file from the external PLC, and how can you do that?
No, you have to check the create symbol file in CoDeSys. (You also have to select what is in the symbol file)
Then when the project is built a file with the same name as the project but the extension .SYM or .SDB is created.
The EXOR software reads in this file and creates tags to match the ones in the PLC.
I have never done this directly but I believe our application engineers have.
Thaks for the reply
I think I know what you mean now.
But it sounds most like when you import tags in the HMI software. Correct me if wrong.
What I want is
1: I will connect the internal PLC(Running CoDeSys) in the panel with an external PLC(Running another software then codesys) over Modbus TCP / IP.
The external plc who run the slave operation, and which I have verified that I can get in touch with over Modbus TCP via a Windows program.
2: I want to do so that I can get the internal PLC in the panel to control the external PLC.
3: I want to read the input/output status of the external PLC, or at least be able to access some memory areas, for example the 40000 area and read / write in them.
Thanks
Ah, now I understand wha you are saying.
There we have no experience with EXOR but I have done Modbus/TCP with Moeller XC201 controller.
One side of this like will be master and the other slave (server). The slave side is usually more complicates because that is where more data handling is needed. For either case in the Moeller you needed a data array of Words to hold the information.
For a master, They have a Modbus_Setup function block that will establish the communication socket. Then the master uses MB_Read and MB_Write function blocks to move the data. The master can choose to run these all the time (trigger again after they are done) or just wham it needs to.
Foe a slave, the controller has to continuously run a function block that looks for connection requests, parses the Modbus messages and reacts to the Modbus requests from the master and send replies back. That is why the slave (server) side is more complicated.
If your external PLC can be set up as a slave easily, I would do that. Many PLCs have this built in so you don't have to mess with it.
It is very simple.
See the attached screenshot.
Just connect the variables.
For the OpCode see the library manager.
Thanks TimvH I will try it as soon as I can, it looks almost too easy.
Thanks to ndzied1 for helping too.
/Rune