ITS PLC MHJ Edition
ITS PLC MHJ Edition
Hello
I would be really thankfull if i could be helped out with this problem.:
In the PLC training book for MHJ ITS PLC "Industrial Automation Practices"
on page 142 to 146 is there described a solution for keeping
count and track of low/high pallet's position on the entry conveyer.
It is done by counting pallets on the conveyer with a "ring counter" procedure,
and with a shift register procedure where the register is shiftet to left, when a
pallet is approching on entry conveyer.
And the rightmost bit is shiftet from "0" to "1" if it is a high pallet.
When the pallet is leaving entry conveyer. "Count" register is counting down. And "Queue" register should be updated.
I think i got the "ring counter" and "Count" register correctly programmed in S7.
It is the "Queue" register, queue procedure and the shift of rightmost bit, I am not able to program in to useful S7 plc code.
The IEC 61131-3 Structured Text code is as follow.:
//--------------------------------------------
IF F_IN_0.Q THEN
COUNT:=ROL(COUNT, 1)
IF (COUNT = WORD#16#2) THEN //I am using RLD/RRD here and it seem to work.
ENTRY_BUSY := TRUE;
END_IF;
QUEUE := SHL(QUEUE, 1) // How to program this in S7 ? I am using SLW here.
IF iN_2 THEN //
QUEUE := QUEUE OR WORD#1; // How to program this in S7 ?
END_IF;
END_IF;
IF F_IN_3.Q
ENTRY_BUSY := FALSE;
IF (COUNT AND QUEUE) <> WORD#0 THEN // How to program this in S7 ?
DISCHARGE_DIRECTION := TRUE;
ELSE
DISCHARGE_DIRECTION := FALSE;
END_IF;
//---------------------------------------
I have tried and tried for a "loooong" time now to solve this. With no luck.
So any help and hints is very welcome.
Attached is scanned pages 142 to 146.
I would be really thankfull if i could be helped out with this problem.:
In the PLC training book for MHJ ITS PLC "Industrial Automation Practices"
on page 142 to 146 is there described a solution for keeping
count and track of low/high pallet's position on the entry conveyer.
It is done by counting pallets on the conveyer with a "ring counter" procedure,
and with a shift register procedure where the register is shiftet to left, when a
pallet is approching on entry conveyer.
And the rightmost bit is shiftet from "0" to "1" if it is a high pallet.
When the pallet is leaving entry conveyer. "Count" register is counting down. And "Queue" register should be updated.
I think i got the "ring counter" and "Count" register correctly programmed in S7.
It is the "Queue" register, queue procedure and the shift of rightmost bit, I am not able to program in to useful S7 plc code.
The IEC 61131-3 Structured Text code is as follow.:
//--------------------------------------------
IF F_IN_0.Q THEN
COUNT:=ROL(COUNT, 1)
IF (COUNT = WORD#16#2) THEN //I am using RLD/RRD here and it seem to work.
ENTRY_BUSY := TRUE;
END_IF;
QUEUE := SHL(QUEUE, 1) // How to program this in S7 ? I am using SLW here.
IF iN_2 THEN //
QUEUE := QUEUE OR WORD#1; // How to program this in S7 ?
END_IF;
END_IF;
IF F_IN_3.Q
ENTRY_BUSY := FALSE;
IF (COUNT AND QUEUE) <> WORD#0 THEN // How to program this in S7 ?
DISCHARGE_DIRECTION := TRUE;
ELSE
DISCHARGE_DIRECTION := FALSE;
END_IF;
//---------------------------------------
I have tried and tried for a "loooong" time now to solve this. With no luck.
So any help and hints is very welcome.
Attached is scanned pages 142 to 146.
Attachement
Here is the scanned pages from the book.
Sie haben keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Zuletzt geändert von Johnsuni am 14 Dez 2013, 23:33, insgesamt 5-mal geändert.
Attachement page 2 3 4
Page 2,3 and 4
Sie haben keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Zuletzt geändert von Johnsuni am 14 Dez 2013, 23:36, insgesamt 2-mal geändert.
Hello,Matthias hat geschrieben:Hello,
it's not an easy task to convert the IEC-ST into STL.
Which S7 programming software do you use?
If you work with Step7 V5.5 you create an SCL Block and copy/paste the code of the book.
Tanks for the fast reply.
yes, I use Siemens STEP 5.5 and do also have the SCL module. (I do also use WinSPS-S7 V5.)
I could give it a try with SCL
But the training book only use ST to describe a suggestion for a solution.
It should be possible to do the program with all 5 programming language's.
LAD,FDB,ST, Graph, and SCL.
As a trained electrician and a electrical engineer, LAD,FDB, and Graph would be the most understandable for me.