apmcs1
Lifetime Supporting Member
Hi All
First post.
I have 40 bytes in a database that are displayed as ascii text on a Lauer PCS 095 display, if any of the bytes arent valid ascii (such as 00hex) the whole 16 characters on the display turn to filled in circles.
I need to check each byte and if its value is not between 20 and 7F hex, I want to replace the contents with a 20 hex.
this is the current code:
// Copy ErrorString to Display
CALL "BLKMOV"
SRCBLK :=P#DB181.DBX56.0 BYTE 40
RET_VAL:=MW250
DSTBLK :=P#DB50.DBX420.0 BYTE 40
I need to check the 40 bytes in DB50.DBX420 to 459 and change them to 20's if they are not within 20 and 7F hex.
Do the math or compare functions only work with 16 bits or higher?
I'm using Siemens Step7 V5.3 sp2
thanks
Dave Welch
Autoliv
First post.
I have 40 bytes in a database that are displayed as ascii text on a Lauer PCS 095 display, if any of the bytes arent valid ascii (such as 00hex) the whole 16 characters on the display turn to filled in circles.
I need to check each byte and if its value is not between 20 and 7F hex, I want to replace the contents with a 20 hex.
this is the current code:
// Copy ErrorString to Display
CALL "BLKMOV"
SRCBLK :=P#DB181.DBX56.0 BYTE 40
RET_VAL:=MW250
DSTBLK :=P#DB50.DBX420.0 BYTE 40
I need to check the 40 bytes in DB50.DBX420 to 459 and change them to 20's if they are not within 20 and 7F hex.
Do the math or compare functions only work with 16 bits or higher?
I'm using Siemens Step7 V5.3 sp2
thanks
Dave Welch
Autoliv