Programming in ST (Structured Text)

Dariusch

Member
Join Date
Sep 2003
Posts
284
Hi all,

I am trying to the GX IEC Developer and are trying the ST programming mode.

But how do you make a Pulse --|P|-- ??

Does any of you have any experience in the ST programming (good or bad)?


Thank you

Dariusch
 
A pulse is not a standard statement for ST. I don't know the GX IEC Developper.
What I do in ST compare the new state of the input with the previous state of the input.

Henry
 
But how do you make a Pulse --|P|-- ??

Example positive puls:
PROGRAM PLC_PRG
VAR
In: BOOL;
Inold: BOOL;
ut: BOOL;
END_VAR
IF In = Inold THEN
ut:=FALSE;
ELSE
IF In THEN
ut:=TRUE;
END_IF
END_IF
Inold:=In;
I think ST programming is the best

Olle.T
 
Hi,

I don't know GX... but this should
work on most PLC:

A input
AN bit xy
= pulse

A input
= bit xy



cheers
Rolf
 
This is a better example:

PROGRAM PLC_PRG
VAR
in:BOOL;
out:BOOL;
inold: BOOL;
END_VAR

out:=in AND NOT inold;
inold:=in;

Olle.T
 
Thank you all for the response.

Now Iam so fare:

Test_TRIG(_CLK:=Start); (*Call the FB R_TRIG*)

IF X3 AND ??? THEN;
D12:= D12+1;
END_IF

But where is the output from the oneshot???
The Test_TRIG is the FB "R_TRIG" (IEC) and the variable for execute the FB is "Start" (_CLK) , but where is the (Q) output??
Dariusch
 
Dariusch,
I had to find out "the hard way" too about 5 years ago, not Mitsubishi, but Beckhoff, no documentation.....
 

Similar Topics

Hello everyone: I have been able to read and write data via canopen interface through ADS read and write functional blocks in Twincat PLC...
Replies
9
Views
4,265
hi, i think this is my first time to use structure text program in OMRON. i use it for make fuzzy logic to control voltage induction generator...
Replies
18
Views
5,758
Good day to all, I'm a proficient PLC Programmer in the Ladder format. Just recently I'm studying the Structured Text Programming and it's nature...
Replies
12
Views
20,796
This question is addressed to those who have ample experience with both LL and ST. I know only ladder logic. I find that many a time it takes...
Replies
32
Views
26,936
Hi, I have been working with PLC systems for the past five years, up to now all of my programs have been written in ladder logic. Now I have...
Replies
3
Views
6,410
Back
Top Bottom