When i set a bit in address %M34.0 i want the word MW34 to be changed, but certanly it does not work as expected. What do i do wrong.
From Global variable list:
Alarm33 AT %MX34.0: BOOL;
Alarm34 AT %MX34.1: BOOL;
Alarm35 AT %MX34.2: BOOL;
Alarm36 AT %MX34.3: BOOL;
Alarm37 AT %MX34.4: BOOL;
Alarm38 AT %MX34.5: BOOL;
Alarm39 AT %MX34.6: BOOL;
Alarm40 AT %MX34.7: BOOL;
Alarm41 AT %MX35.0: BOOL;
Alarm42 AT %MX35.1: BOOL;
Alarm43 AT %MX35.2: BOOL;
Alarm44 AT %MX35.3: BOOL;
Alarm45 AT %MX35.4: BOOL;
Alarm46 AT %MX35.5: BOOL;
Alarm47 AT %MX35.6: BOOL;
Alarm48 AT %MX35.7: BOOL;
AlarmReg2 AT %MW34: INT;
See also picture.
If one of the bits is true i want to tell that alarm is active by checking the word MW34.
When i set a bit in address %M34.0 i want the word MW34 to be changed, but certanly it does not work as expected. What do i do wrong.
From Global variable list:
Alarm33 AT %MX34.0: BOOL;
Alarm34 AT %MX34.1: BOOL;
Alarm35 AT %MX34.2: BOOL;
Alarm36 AT %MX34.3: BOOL;
Alarm37 AT %MX34.4: BOOL;
Alarm38 AT %MX34.5: BOOL;
Alarm39 AT %MX34.6: BOOL;
Alarm40 AT %MX34.7: BOOL;
Alarm41 AT %MX35.0: BOOL;
Alarm42 AT %MX35.1: BOOL;
Alarm43 AT %MX35.2: BOOL;
Alarm44 AT %MX35.3: BOOL;
Alarm45 AT %MX35.4: BOOL;
Alarm46 AT %MX35.5: BOOL;
Alarm47 AT %MX35.6: BOOL;
Alarm48 AT %MX35.7: BOOL;
AlarmReg2 AT %MW34: INT;
See also picture.
If one of the bits is true i want to tell that alarm is active by checking the word MW34.
MW34 is likely MX68.0 through MX69.7
Thanks i see. This was very different form Siemens world...
So for a byte its the same. Word: devided by 2. DWord:devided by 4?