Differences in execution of JMP commands between S7-300 & S7-400 CPUs

RMA

Member
Join Date
Sep 2004
Location
North of Hamburg, Germany
Posts
2,052
Whilst searching for something else on the Siemens Support website, I fell over an FAQ about the differences between the execution of JMP commands between the 300 and 400 CPUs.

Apparently, as a consequence of the program in the 300 CPU being compiled before being executed, when you execute a JMP command the VKE and /ER Bits in the Status word are not reset. As a result if you jump into a decision chain, under certain circumstances, you can come up with the wrong answer.

An example:

O m0.0
O m0.1
R m0.0
S m0.1

A m0.1
JC j_01
= m1.0

j_01: O m0.0
O m1.0
= m2.0

On a 400 CPU, you would get the result you expect, i.e. m2.0 would remain "0".

On a 300 CPU, the VKE = 1 which caused the jump in the first place, would be merged with the two OR commands and m2.0 would be set to a "1".

As far as I can see, this is primarily a problem with ORs, and looking through some of my programmes, for reasons best know to my subconscious, I seem to work overwhelmingly with ANDs.

However, for those situations where is does matter, or even just to include as a matter of course, so as to be on the safe side, can somebody tell me, what is the fastest (i.e. most efficient) way (command) to reset the VKE and /ER Bits?

Edit: Can somebody remind me what the command was to get code displayed correctly, without all the leading blanks getting stripped out - I've seen it before, but I've forgotten what it was!
 
Last edited:
Yeah, I must admit I was kinda counting on Jesper knowing what I was talking about!

The S7 manuals give a list of all the STL (AWL) commands and their English equivalents, but not all the other odds and ends, sometimes I can guess near enough but other times I haven't a clue what it will be. I assume RLO is Result of Logical Operation or something similar.
 
RMA said:
I assume RLO is Result of Logical Operation or something similar.

That is correct

At least you speak English (with a slight northern accent :D ) and I assume you speak German, so you can have an educated guess at the English equivalent of the German notation, if it ain't English I'm stuffed!!

Paul
 

Similar Topics

Hi all. Currently I'm working on a VBa script for FTView. I would like to understand a bit better about some commands. 1) What are the...
Replies
3
Views
613
Hello everyone, I'm pretty new to the Schneider world. I'm trying to code on an M340 CPU and i was wondering what's the difference between %M...
Replies
15
Views
1,632
1756-um004_-en-p From the manual above, 1756-EN2TP supports PPP communication, and the 1756-EN2TR has an embedded switch. Is the EN2TR embedded...
Replies
2
Views
2,873
Hi, I’d like to know the differences between these two plcs.
Replies
3
Views
1,765
Hi While running the compare tool for two Projects, I am getting the attached difference in Program and Run. See attached. The difference seems...
Replies
3
Views
1,569
Back
Top Bottom