Attached is a portion of a program I am trying to decipher. The original program was in Italian and I converted it to English. I have limited experience with StL programming. I am an old school ladder logic dog. Could some one write this out in ladder so I can get a grasp on what is going on? I having problem wrapping my head around the XN command. This is a Siemens PLC and I am relatively new to Siemens.
If anyone can help shed some light, it is appreciated.
1. rung (from line1)
XOR NOT Between DB_M22" .Out.U13 and DB_M22" .Aux.Feedback1 + AND NOT DB_M22" .Fine_TimeOut.C01 = Count up
(So it means if both DB_M22" .Out.U13 and DB_M22" .Aux.Feedback1 are "1" or "0" and no timeout bit => Count timeout up)
2. rung ( From line 6)
XOR between
DB_M22" .Out.U13 and "DB_M22" .Aux.Feedback1 = Counter reset
(Out13 = 1 or Aux.Feedback1 = 1 = > Ctrst
(line 12 and 17 are Jump instrucions if RLO = 0 (logic operation result before = 0) so now (Ctup = 0 or Ctrst = 0, because only And with one pin before.
3. rung. (from line 10).
if CTUP is = 1 then
DB_M22" .Status_TimeOut.C01 = DB_M22" .Status_TimeOut.C01 + "System Status". "Cycle Time". Real
(count timeout value up)
4. rung (line 16)
if A #Ctrst = 1
DB_M22" .Status_TimeOut.C01 := 0
(reset counted timeout)
5. rung (line 20)
DB_M22" .Status_TimeOut.C01>= DB_M22" .Limit_TimeOut.C01
coil DB_M22" .Fine_TimeOut.C01 = 1
p.s If you have step 7 5.5/ 5.6 classic, this should convert automatically to ladder if you change STL view to ladder view.
ON TIA portal it won't convert anymore.