ITS PLC MHJ Edition

STEP7 ist die Programmiersprache der SIMATIC S7-Steuerungen. Allgemeine Fragen.
Antworten
Johnsuni
SPSTreff-User
Beiträge: 4
Registriert: 13 Dez 2013, 19:35

ITS PLC MHJ Edition

Beitrag von Johnsuni »

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.

Johnsuni
SPSTreff-User
Beiträge: 4
Registriert: 13 Dez 2013, 19:35

Attachement

Beitrag von Johnsuni »

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.

Johnsuni
SPSTreff-User
Beiträge: 4
Registriert: 13 Dez 2013, 19:35

Attachement page 2 3 4

Beitrag von Johnsuni »

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.

Benutzeravatar
Matthias
SPSTreff-Profi User
Beiträge: 288
Registriert: 19 Jun 2010, 11:16
Wohnort: Bretten
Kontaktdaten:

Beitrag von Matthias »

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.

Johnsuni
SPSTreff-User
Beiträge: 4
Registriert: 13 Dez 2013, 19:35

Beitrag von Johnsuni »

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.
Hello,
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.

Antworten