Step7 - Can someone tell me what's wrong with this!

Roy - when the plc stops you should be able to select the buffer entry for the alignment error and the OPEN BLOCK button should be available. Click on it and the block will open and the cursor will be at the line after the line of code where the error ocurred.
Again with the plc stopped, the Istack button should be available from the stacks tab, this will show you the registers etc.
The important thing is not to restart the plc until you have performed the above.
 
I ran the train into the buffers again and this time I remembered to copy all the stack info, including the call in OB1. As you can see, the address in AR1 is indeed a Bit address - but how come?

Oops, forgot to rename the files again - they'll soon be there!
 
Last edited:
I think I've got it. It is possible to jump to the "run" label without pntr (or the previous analogue) being calculated - hence the random value!

Code:
	 UN	#Start_Stop; //Are we in the active Step?
	  SPB   Exit; 
	  U	 #New; //Check for start of new run
	  SPB   run;
 

Similar Topics

This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
147
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
143
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
140
Hi all, I am trying to convert RSLogix 5000 program to Step7. I need to bit shift left my array of double integers for tracking the product on...
Replies
2
Views
526
I have a word in some DB which I want to load to AR1 and use as a pointer. In order to do this I need to write L DBxy.DBW xy SLD 3 LAR1 I...
Replies
3
Views
543
Back
Top Bottom