0

Variables declared like this

bMyVar AT %MB100: BOOL;

can be accessed from another PLC by using the ADS read or write FB. Other programs, like the HMI Movicon, use the .tpy file in order to get a list of the available variables. Unfortunately variables declared with a memory location like the above are not present in the TPY file and cannot be read from the HMI software. Why does this happen if Twincat itself is able to read these variables using ADS? (HMI uses ADS too..)

sharkyenergy
  • 3,842
  • 10
  • 46
  • 97
  • Any variable is the same. Like this `bMyVar: BOOL;` or like this `bMyVar AT %MB100: BOOL;`. There is no difference. In first case memmory address assigned automatically and in second case explicitly. SO if you can access `bMyVar: BOOL;` then you will be able o access `bMyVar AT %MB100: BOOL;`. – Sergey Romanov May 31 '18 at 04:19
  • thanks @SergeyRomanov. Then why is it not present in the TPY file? if you start with an empty project and just declare 2 variables, one with memory address and one without, then the TPY file will only contain the one without the memory address... – sharkyenergy May 31 '18 at 05:36
  • Perhaps you should define a GVL for user interface only and add necessary variables there and update them after each PLC cycle. Then you don't have to worry that. – Quirzo Jun 01 '18 at 05:19
  • @sharkyenergy, that is right. Variable without addressing allocated automatically thus we do not need to know where exactly store that variable, so there is not sense to put it to TPY file. We only indicate there variables that we explicitly want to assign to special memory locations. – Sergey Romanov Jun 01 '18 at 10:37

0 Answers0