Dear Experts ,
I am new to AR and I am in need of sending some data to 3rd party Scada via Modbus serial. Modbus communication is already established. I just need to assign Address register to my analog variable so that in Modscan values should appear in Holding register of 40100 , 40102 and so.
I am not able to find where to assign the address in tag editor. Please point me in the right direction.
share some screenshots or manuals so that i can work it out.
thanks in advance.
Hi,
if I got it right and you’re using modbus serial on one of the “normal” serial interfaces of the PLC, then the’re no address assign by tag editors.
In that case, the Modbus RTU protocol is processed by own code using library “DRV_mbus”.
How to put/get modbus data (coils, registers) into process variables depends on if you’re a modbus master or a slave.
- Being a master, the configuration is done by settings in the configuration data module that has to be used together with the function block “MBMOpen” - in this module, existing process variables are “linked” to modbus coil or register addresses
- Being a slave, the “coil or register memory” is linked to process variable arrays either by providing the addresses of the arrays when calling the function block “MBSOpen”, or by declaring global array variables namens “MB0[i]” … to “MB4[i]” (for the 4 different modbus variable types) with a suitable array size to cover the whole register range you need to use. This varables then are automatically used by MBSOpen.
So if the modbus communication is already established, I assume you already have some running code based on the DRV_mbus library: is it a master or slave?
Best regards!
Dear @alexander.hefner
Thank you very much for responding. You are right i am using normal serial interface for communication.
In my case my plc is the master and sending an array of data to others. I am just trying to understand and modify the existing code for sending extra register in 40100 series.
Your response is very informative .
I will appreciate if you can share any screenshot or manual for sending data from 40100 to 40150.
Hi,
I’m out of the office right now, and I don’t have a suitable project available.
But: as you’re a master, there should be a dataobject in the project with the master configuration. The name of this data module should be given at the function block input .pConfig of MBMOpen.
Could you please paste the content of this data object, maybe the we can give some hints?
Best regards!