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

The past week we received a new piece of equipment from Germany which utilizes siemens controls. Typically in our company we use A.B. controls for...
Replies
5
Views
59
Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
5
Views
116
Hi need help why this “failure 5 emergency stop “ appears at every startup in the morning ? Have to shut off main switch at least 10 times on...
Replies
19
Views
286
i have two plc 1. s7-1212dc/dc/dc ip; 192.168.0.1 2. s7-1500 1513-1pn ip; 192.168.3.2 i need to get data from plc1 to plc2. any idea how to do...
Replies
5
Views
100
Hi everyone hope you'll well. Is it possible for me to download a Crack version of tia portal v13..sorry to say this but the software is very...
Replies
5
Views
197
Back
Top Bottom