Siemens BLKMOVE with nested structure

JDCROCKETT724

Member
Join Date
Jun 2010
Location
Michigan
Posts
249
I am trying to copy settings from a DB that stores two different models worth of settings in it to a particular DB.

This is how it works:
I have 3 root structures within my DB. One is the current settings, one is model A and the other is model B. When I change models I copy the specified model to the "Current" settings. These settings are then used by the machine to work.

Within the "Current" struct there are 4 identical structures that need to be copied to their respective DB's. These structures are called INJ1_Settings, INJ2_Settings, INJ3_Settings, INJ4_Settings. There are 9 REAL data types in each one. So I wish to copy INJ1_Settings in the "Current" struct to DB15 which has a struct of the same size and data types as INJ1_Settings. Then copy INJ2_Settings in the "Current" struct to DB16 and so forth.

My Problem:
When triggering the BLKMOV with a one shot the settings in INJ4 are getting transferred to DB15 and NOT the INJ1 settings that I have as the SRCBLK.

o_O

Any ideas why a struct 3 away from the one I specified in the BLKMOV is being transferred instead of the one I called for?

Thanks in advance

Edit: I found if I hold the enable on the BLKMOV on instead of triggering it with a one shot that it works as it should. However, I need to keep that as a one shot copy if possible.

sfc.JPG struct.jpg
 
Last edited:
SFC20 should finish in one instance. No need to keep the EN for a longer time.
The only thing that should be able to mess it up is if the SFC20 is interrutpted, by a HW interrupt or timed interrupt. Is that a possibility ?

Apart from that I suggest 2 things.
1. Make a UDT with the structure that is used several places, then define the data by the UDT.
2. Run a block consistency check.
Maybe that clears it up.
 
You don't appear to have specified how much data to move after your pointer. I always specify mine in bytes but I suppose it would work as Marcius suggests with REAL 9.
 
If you enter a named variable for an any pointer parameter, the editor will generate the pointer format for the call, but will show it to you as the variable name.

iad.JPG
 
Ok. I was copying the relevant blocks over to another program for offline and PLC simulation analysis for you siemens pros, but now the simulation works just the way I want it to. So something is going on different between my cleaned up program to post here and my actual program.
 
Alright. This is a little embarrassing. It must have been an off day for me yesterday. I found some copy paste errors that I thought I got rid of and didn't look back on them. So I was copying to my INJ1 settings 4 times with the last one being from INJ4. Thank you for all your responses, and sorry to waste your time. 🙃🍻
 

Similar Topics

Hello, I have a CPU 317-2DP Firmware Version V2.1.8. In TIA Portal only V2.6 is available, and there is no option to upgrade FW. Then I open it...
Replies
2
Views
97
HI everyone, i am new to Siemens plc programming and i am in need of some help. yesterday we had an S7-1200 CPU 1214C fail to turn on an output to...
Replies
9
Views
291
Hi PLC people, think about this scenario: The PLC is somehow connected to the same network with the facilities` network. Then someone connects to...
Replies
2
Views
105
Hello everyone, I've had this issue for the last 2 days where I try to assign the profisafe address to an IO block (6ES7 146-6FF00-0AB0) but when...
Replies
5
Views
159
Hello, good morning, I have been having two problems with the Tia Portal software. The first is that I have installed it on my computer and...
Replies
5
Views
197
Back
Top Bottom