is VB0 first byte of VW0 or fourth byte of VW0 or they do not overlap?

arhi

Member
Join Date
Mar 2013
Location
Belgrade
Posts
11
is VB0 first byte of VW0 or fourth byte of VW0 or they do not overlap?

If I have

0xf000 MOV_W VW0
0x5 MOV_B VB0

What's in VW0 now? 0xf000, 0x5000, 0xf005 ?

are the Vx# overlaping where # being start pointer and x defining how many bytes, or the x is just the size and # id?
 
is VB0 first byte of VW0 or fourth byte of VW0 or they do not overlap?

If I have

0xf000 MOV_W VW0
0x5 MOV_B VB0

What's in VW0 now? 0xf000, 0x5000, 0xf005 ?

are the Vx# overlaping where # being start pointer and x defining how many bytes, or the x is just the size and # id?
First of all, you don't tell us what PLC you're talking about, which can be of the upmost importance. IF you're talking about Siemens PLCs (others may be different) then VB0 is the first byte (leftmost) of the two bytes forming VW0.

In no case a byte can be the fourth byte of a word since a word consists of only two bytes. A collection of four bytes is called a double word (that is in Siemens terminology).

The instructions shown let me believe you're talking about something different than a Siemens PLC.

Kind regards,
 
First of all, you don't tell us what PLC you're talking about, which can be of the upmost importance.

Hi thanks, it's old Siemens S7-200 (cpu 226 if it matters)

IF you're talking about Siemens PLCs (others may be different) then VB0 is the first byte (leftmost) of the two bytes forming VW0.

Great, so the # at the end is ram location and the size defines how many bytes (yes word is 2 bytes, dunno why I made that mistake). So

MOVB 0x12, VB0
MOVB 0x34, VB1

(this should be proper syntax?)

gets me 0x1234 in VW0 ... now things make more sense :D

thanks a bunch
 

Similar Topics

Our system utilises INPUT_BYTE to capture NMEA0183 ASCII stream which sends data to the NOM multiple times a second. The NOM module can either be...
Replies
0
Views
365
Hello everyone, friends. I need help with something. I want to read and change Bit and Byte numbers via HMI. I found a code snippet for this as...
Replies
18
Views
3,010
Hello everyone :) I just want to start with learning PLC programming, so I need advice. I have SIMATIC S7-1200, CPU with integrated memory...
Replies
5
Views
907
I have a C-More HMI that changes my PLC String from "Machine Status" to "aMhcni etStasu" . There is an option with other objects that have string...
Replies
15
Views
3,413
Hello I have got a problem with positive edge from "system clock memory byte" in Tia Portal. I would like to change byte"system clock memory"...
Replies
27
Views
3,537
Back
Top Bottom