Robert Carlsson
Member
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:
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?
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?