[?]: Unity Pro expression

другие контроллеры
low_rad
Posts: 6
Joined: Sat Jul 05, 2008 4:25 pm
Location: Europe

[?]: Unity Pro expression

Post by low_rad »

Hello.

Can someone please explaine to me what these line does:

Code: Select all

%MW15000[%MW11098]:100:=%MW8000:100;

%m7501:198:=%m7500:198;
(they are not from the same part of the program)

I mean what is being moved to where and why.
Can't seem to find anything about it online.

Patrik
Schtiel
Site Admin
Posts: 1122
Joined: Wed Sep 06, 2006 12:03 pm
Location: CIS

Re: [?]: Unity Pro expression

Post by Schtiel »

When you check 'Directly represented array variables' option (PLC - Project Settings - Variables), it becomes possible to:
  • declare references via indexed addresses (e.g. %MW1[3]); for example, %MD6[10] is equal to %MD[26]
  • reference bits and words as tables (Array) (e.g. %MW1:16); for example, %MW125:30 is equal to %MW154
  • Use a combination of both of them (e.g. %MW1[3]:16).
You can read more just clicking Help button in this window:
Image
low_rad
Posts: 6
Joined: Sat Jul 05, 2008 4:25 pm
Location: Europe

Re: [?]: Unity Pro expression

Post by low_rad »

Thank you. I've got it now =)