Here is a table that will help you. You have to use the AT keyword to locate the variables to IEC address. Then the HMI reads the IEC address via Modbus registers.
Here are some examples how to use the AT keyword
myBool AT %MX0.0 : BOOL; //Boolean Type
myInput AT %IX0.0 : BOOL;
myOut AT %QX0.0 : BOOL;
myByte AT %MB0 : BYTE; //Byte Type
mySINT AT %MB0 : SINT;
myUSINT AT %MB0 : USINT;
myByteArary AT %MB0 : ARRAY[0..10] OF BYTE;
myWORD AT %MW0 : WORD; //16 bit types
myINT AT %MW0 : INT;
myUINT AT %MW0 : UINT;
myWordArary AT %MW0 : ARRAY[0..10] OF WORD;
myDWORD AT %MD0 : DWORD; //32bit Types
myDINT AT %MD0 : DINT;
myUDINT AT %MD0 : UDINT;
myReal AT %MD0 : REAL;
myDwordArray AT %MD0 : ARRAY[0..10] OF DWORD;
This is only valid for some devices. The device should in this case have Modbus Slave capabilities.
In general the easiest solution would be to use the CoDeSys HMI.
Choose an HMI which can run the CoDeSys HMI (could also be an industrial PC with e.g. Windows XP embedded) and create your visualization in your CoDeSys application.
If you have an HMI which doesn't run the CoDeSys Visualisation, but has its own tool, it would be best to choose one which has a specific CoDeSys driver.
In this case you can directly access the CoDeSys PLC variables.
In this case you need to add the Symbol Configuration to your application and select which variables can be accessed by the HMI.
If your HMI is a PC, you could also choose to use a SCADA package and access the variables (available through the Symbol Configuration) with the CoDeSys OPC server. All SCADA packages have an OPC client and therefore it works quite easily.
I hope this helps you find the right solution.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In this case you can directly access the CoDeSys PLC variables.
In this case you need to add the Symbol Configuration to your application and select which variables can be accessed by the HMI.
====================================================
How to diectly access the CoDeSys PLC variables without a protocol such as CANOpen or J1939? How to access via Symbol ConfigurationοΌ
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This depends on the PLC you use.
Normally you should be able to use the programming port (USB/Serial/Ethernet).
In your CoDeSys V3 application you can right click on the application and add the object: Symbol Configuration.
Here you should add the variables.
Please contact your PLC vendor and HMI vendor for further details.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thans!
Now,i can access the iec variable by the name!
In codesys ,i used the Symbol configuration to define variables which i need accessed outside of codesys.
Also,i used the templates in CoDeSysRTK to access the predefine variables .
i do it successed!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In my systems , there is the requirement of accessing the variables of the IEC application to display in a HMI.
Do you have any examples?
Best regards
Here is a table that will help you. You have to use the AT keyword to locate the variables to IEC address. Then the HMI reads the IEC address via Modbus registers.
Here are some examples how to use the AT keyword
myBool AT %MX0.0 : BOOL; //Boolean Type
myInput AT %IX0.0 : BOOL;
myOut AT %QX0.0 : BOOL;
myByte AT %MB0 : BYTE; //Byte Type
mySINT AT %MB0 : SINT;
myUSINT AT %MB0 : USINT;
myByteArary AT %MB0 : ARRAY[0..10] OF BYTE;
myWORD AT %MW0 : WORD; //16 bit types
myINT AT %MW0 : INT;
myUINT AT %MW0 : UINT;
myWordArary AT %MW0 : ARRAY[0..10] OF WORD;
myDWORD AT %MD0 : DWORD; //32bit Types
myDINT AT %MD0 : DINT;
myUDINT AT %MD0 : UDINT;
myReal AT %MD0 : REAL;
myDwordArray AT %MD0 : ARRAY[0..10] OF DWORD;
mySTRING AT %MB0 : STRING; //STRING
Jzhvymetal
SoM Modbus Table.xls [418.5 KiB]
This is only valid for some devices. The device should in this case have Modbus Slave capabilities.
In general the easiest solution would be to use the CoDeSys HMI.
Choose an HMI which can run the CoDeSys HMI (could also be an industrial PC with e.g. Windows XP embedded) and create your visualization in your CoDeSys application.
If you have an HMI which doesn't run the CoDeSys Visualisation, but has its own tool, it would be best to choose one which has a specific CoDeSys driver.
In this case you can directly access the CoDeSys PLC variables.
In this case you need to add the Symbol Configuration to your application and select which variables can be accessed by the HMI.
If your HMI is a PC, you could also choose to use a SCADA package and access the variables (available through the Symbol Configuration) with the CoDeSys OPC server. All SCADA packages have an OPC client and therefore it works quite easily.
I hope this helps you find the right solution.
In this case you can directly access the CoDeSys PLC variables.
In this case you need to add the Symbol Configuration to your application and select which variables can be accessed by the HMI.
====================================================
How to diectly access the CoDeSys PLC variables without a protocol such as CANOpen or J1939? How to access via Symbol ConfigurationοΌ
This depends on the PLC you use.
Normally you should be able to use the programming port (USB/Serial/Ethernet).
In your CoDeSys V3 application you can right click on the application and add the object: Symbol Configuration.
Here you should add the variables.
Please contact your PLC vendor and HMI vendor for further details.
Thans!
Now,i can access the iec variable by the name!
In codesys ,i used the Symbol configuration to define variables which i need accessed outside of codesys.
Also,i used the templates in CoDeSysRTK to access the predefine variables .
i do it successed!