8/17/2013 2:27 AM | |
Joined: 10/7/2005 Last visit: 6/5/2023 Posts: 2966 Rating:
|
Hello arain DB 151 will be opened in your example. The DO command uses the content of the Low Byteandignores the High Byteof the word. To be clear, FY103 is the High Byte and FY104 is the Low Byte of FW103. I hope this helps |
Cheers |
|
This contribution was helpful to
1 thankful Users |
8/17/2013 5:25 AM | |
Posts: 61 Rating:
|
thx fritz ..... |
This contribution was helpful to
1 thankful Users |
8/18/2013 9:23 PM | |
Posts: 61 Rating:
|
if the lower byte have value -15 then DO command is applyed so what would happen ????
|
8/19/2013 2:08 AM | |
Joined: 10/7/2005 Last visit: 6/5/2023 Posts: 2966 Rating:
|
Hello arain -15 as a signed Integer is a bitpattern of 11110001. The DO command will treat the valueas an unsigned Integer, so 11110001 has a value of 241 for it (e.g. it will open DB 241, or load DW 241 etc.). I hope this helps |
Cheers |
|
This contribution was helpful to
1 thankful Users |
8/19/2013 7:40 AM | |
Joined: 11/21/2007 Last visit: 6/1/2023 Posts: 2321 Rating:
|
Hi arain The Higher Byte has no significance if the DO comand is used to read Word / Byte values or Blocks / Timers / counters. However it does have significance if you are trying toindirectly address Bit values ( Input / Output / Flag bits ) In such cases the Lower Byte( Bit 0 to 7 of Word ) contains the Byte address and the Higher byte ( Bit 8 to 10of word ) contain the bit address For Example : LKB 3 T FY 10 L KB 12 T FY 11 DO FW 10 A I 0.0 Would Read the Status of I 12.3 Hope this helps Cheers Navnag |
There is no such thing as the last bug in a program |
|
This contribution was helpful to
1 thankful Users |
Follow us on