Question about BLKMOV instruction in STEP 7

Aleksandra

Member
Join Date
May 2018
Location
Belgrade
Posts
35
Hi everyone,

I have a short question about BLKMOV instruction, illustrated in the image below. I have the same piece of code in STEP 7 (ET200S) and TIA Portal (ET200SP).

In the first case, BLKMOV instruction doesn't allow me to put String data type as an output parameter, and in the case of TIA it does allow... variable at the "DSTBLK" assignment is an OUT variable of the FC.

I need this function in STEP 7, so - how to transfer string value from the temporary variable to the output variable (both of type String), if not with BLKMOV instruction?

Kind regards,

Aleksandra

BLKMOV_Question.JPG
 
One way I can think if is to change your FC to an FB, and use a STAT for DSTBLK, and use the value from the instance DB.

Otherwise, you have to construct the pointer for #stringvalue (which would be the ANY datatype instead of STRING), and use #stringvalue for your DSTBLK - note: Make sure the specified length is the string length + 2 bytes.

Look up the topic "Using the Parameter Type ANY" in STEP 7 help.
 
Last edited:
Easier is to just do it in SCL.
Both in STEP7 Classic and in TIA will SCL encapsulate a lot of the fiddly stuff when copying data around.
In SCL, rather than calling BLKMOV, just write
#StringValue := #tempString ;
 

Similar Topics

In one network SFC20(BLkMOV) is used to transfer 8 byte data from P#DB500.DBX8.0(SRC BLK) to P#DB20.DBX4.0(DST BLK). I would like to change...
Replies
2
Views
4,268
Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
163
Good morning! Let me start by saying, I am still learning about this type of HMI programming. I recently watched a video about recipes and how it...
Replies
0
Views
66
I have some logic that I have written within a 5380 series controller that tracks the time an event is started, while the event is running an RTO...
Replies
2
Views
89
I have an HMI 2711R - T4T Series B, and I want to know which PLCs, besides Micro 820, can communicate with it.
Replies
2
Views
80
Back
Top Bottom