Home > Forum > Operator terminals (Weintek) > Doubt of addressing variables on the system SlimLine
- This topic has 1 response, 1 participant and was last updated 3 years, 11 months ago da Sergio Bertana.
-
AuthorPost
-
May 14, 2020 at 7: 58 am #55182AuthorlessIdle
I am preparing a program with many Modbus variables to be published on a Weintek HMI panel, I have the first 127 BOOL variables, assigned to addresses 100.0 - 100.127, then in Modbus on the panel I use the addresses 40000 - 40127.
Now I should assign REAL variables, the first one will be 100.128, so in Modbus on the panel it will have address 40000+ (128/2) = 40064. But the 40064 is already assigned to a BOOL variable, where did I get lost?
May 14, 2020 at 8: 07 am #55185Sergio BertanaAdministrator ForumLet's try to clarify ...
With access to BOOL variables (Modbus commands 0x / 1x on the HMI panel) the Modbus request address received from the HMI is used by the SlimLine to point to the variable in DB100 by simply subtracting the offset 40000. So the panel's 40064 corresponds to the BOOL variable allocated to 100.64.
With access to WORD variables (Modbus 3x / 4x commands on the HMI panel) the Modbus request address received from the HMI is used by the SlimLine to point to the variable in DB100 by subtracting the offset 40000 e multiplying the result by 2. So the panel's 40064 corresponds to the WORD variable allocated to 100.128.
I still remember that being it SlimLine based on ARM architecture, 2 bytes variables must always be allocated with an address divisible by 2 (Example 100.2, 100.4, ... 100.130, .. 100.514, etc.), 4 bytes variables such as REALs must always be allocated with an address divisible by 4 ( Example 100.4, 100.8,… 100.128, .. 100.512, etc.).
-
AuthorPost
- You must be logged in to reply to this topic.