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,299
I recently uploaded an aplication from a Panel View, created a new screen and now that I've downloaded it to the Panel View, all the texts have...
Replies
9
Views
155
I have never had the pleasure of working with a "Thermistor" until now and have a question. The Thermistor is a 10KOhm 4-20mA 2-wire device and I...
Replies
4
Views
139
Hi All, So I have a main routine with an instruction that's executed by XIC "Run" I have a JSR located on a rung below it. In the logic for that...
Replies
6
Views
244
I have a 120V relay, 120V DI card and a analog input. I was wanting to know if i could put a 24V DI and well as a 120V DI card on the same plc...
Replies
1
Views
104
Back
Top Bottom