Update status word in step7??

Join Date
May 2009
Location
Halmstad
Posts
41
Hey all!

I am developing a block, and this block includes several error checks. If the return value equals 0, all is good. Therefore I use this code:

Code:
L #iReturn
JN err

where iReturn is the return code checked and err is the label where the error handling is conducted. It seems though, that the status word is not updated, and therefore the JN instruction isn't executed as expected. I've added a small example, where I excanged #iReturn for W#16#5 for debug reasons.
Do I need to manually update the status word? AFAIK this should be updated automatically?

bug.JPG
 
Yeah, the error checking code looks like this right now:

Code:
L #iReturn
L 0
==I
JNB err

Just thought it would be more effecitive to just load the iReturn and jump if it differs from zero.
 
You are correct. I'm sorry, my real qestion was if it's possible to update the status word, or do I have to do the comparison as it's done right now?
 
Hehe, but this was not quite what I wanted, since I want the value of ACCU-1 evaluated, and the result put in the status word, rather than manipulating the status word, then I could just skip the comparasion and just assume all went well or failed?
 

Similar Topics

Hello everyone, I am experiencing a strange issue with machine using a PanelView Plus 7 and a CompactLogix 1769 PLC. I am using FTView ME V13...
Replies
1
Views
363
How do you install update on Red Lion Crimson ver 3.1. Do I just need to run the exe file on the host server?
Replies
1
Views
127
Has anyone found a way to convert/replace/update the firmware on old Parker TS80xx series HMIs (i.e. TS8010, TS8006, etc) to accept Crimson...
Replies
0
Views
105
Hi All, we've recently upgraded from FTView SE v10 to v12. Since the upgrade we've been having a problem where the HMI is slow to update tags in...
Replies
0
Views
102
Hi, I have an iFIX 5.5 project (Windows 7) that needs to be updated to version 6.5 (Windows 10). iFIX communicates with the "Siemens Industrial...
Replies
1
Views
179
Back
Top Bottom