[?]: Strange behavior with CPU314C-2 DP

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
venix
Posts: 122
Joined: Fri Feb 29, 2008 4:17 pm
Location: Europe

[?]: Strange behavior with CPU314C-2 DP

Post by venix »

I faced yesterday with a very strange situation.
In a function i have the next code:

Code: Select all

//FC1
A M46.7
A M32.0
A M32.2
JC c001
JCN X001
CALL FC16 //(this is a RESET function)

X001: //......
//.......
C001: //..........
//..........
The problem was that in this code FC16 was called even if it must not.
All the outputs was reset and the machine was not working.

Yes ... it's true that this function can be called in other function but not in my case.
The solution was to delete the call instruction of FC16 in function FC1.After that all was OK

How do you explain this?

Best regards!
Venix
dsekulic
Posts: 186
Joined: Sun Feb 12, 2006 5:47 pm
Location: Europe

Post by dsekulic »

Hi venix,

I think that Your program finction normaly. Point is that after execution of JC c001 command RLO is changed to 1. If RLO before JC c001 is 0 than JCN X001 is executed but with RLO=1. Afterward JCN X001 alow CALL FC16. Try for that reason instead JCN X001 with JC X001.

regards
venix
Posts: 122
Joined: Fri Feb 29, 2008 4:17 pm
Location: Europe

Post by venix »

Hi dsekulic!

This is true ... the RLO for JCN will be never 0 so the JCN instruction will never executes.

Anyway,the program for this machine has a lot of bugs.

Thanks for your quick reply,dsekulic!

Best regards,
venix