Jump to content

Recommended Posts

Posted (edited)

Hi,

I am searching for a  Possibility to Set bits in Set or Reset State. How can i do that?

in Example the Code in LD:

SetReset.png

and in ST

EQ_E( Merker79 AND Referenzfahrt_TP_Ein_Aus = TRUE , bDummy , P_Achse_Istpos_pulse , 0 );

PLS( bDummy , Drehrichtung_P_Achse AND M8140 AND Loeschen_Positionszaehler_Achsen AND Startpos_anfahren_nach_Referenzi AND P_Achse_Referenziert = TRUE );

Edited by Levent1970

Posted

Take a look at this manual

http://dl.mitsubishielectric.com/dl/fa/document/manual/plc/sh080366e/sh080366ej.pdf

[ST program example 1]
IF M0 THEN
Y0 := TRUE;
END_IF;
The above program is equivalent to the following.
LD M0;
SET Y0;


To avoid the bit device being always ON, change the program as shown below.
[ST program example 2]
IF M0 THEN
Y0 := TRUE;
ELSE
Y0 := FALSE;
END_IF;
The above program is equivalent to the following.
(a) LD M0;
OUT Y0;
(b) Y0 := M0;
(c) OUT_M (M0, Y0);

Posted

Or

IF activation_tag THEN

Y0 := 1; // Set Y0

END_IF;

IF deactivation THEN

Y0 := 0; // Reset Y0

END_IF;

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...