Cristian Sulighetean

A function that waits for a specific signal to activate

14 posts in this topic

Hello everyone,

I am new to Mitsubishi PLC. My device is  IQ-F series FX5u-80 and GX Works 3 to set up parameters using ST.

I need to implement a function that waits for a confirmation signal in order to continue to the next step of the program. 

I though about another way by using a delay function instead of confirmation single for testing purpose

Share this post


Link to post
Share on other sites

Sound's like you need STL (step relay or step ladder some may call it...).

In the IQ-F manuals, as i recall, there's a common overview of STL instruction.

More details yo can find in Fx3 series programming manual and it work's the same way

And the only difference was, that with FX3's STL end's with RET instruction.

With IQ-F end's with RETSTL.

But this is for ladder project.

Edited by glavanov
1 person likes this

Share this post


Link to post
Share on other sites
7 hours ago, Cristian Sulighetean said:

I need to implement a function that waits for a confirmation signal in order to continue to the next step of the program.

Is it the complete program that is built using these "wait-tasks", or just a few functions? if it's only a few functions I would just jump them instead of creating a complete STL...

1 person likes this

Share this post


Link to post
Share on other sites

The complete program is build on these wait functions, that's one way of doing it.

First and foremost I have a stepper motor to control, with a confirmation for position sensor and a busy sensor. I've thought about using the wait function in case I can not do it in another way.

The program mainly is a routine of the motor going in different positions and wait to receive the confirmation in order to make the next move.

Share this post


Link to post
Share on other sites

You are describing probably 99% of PLC programs.

If you want to use ST language then I'd try to use a CASE statement.  If that doesn't work look at the other conditional and iteration statements (WHILE or REPEAT for example).

 

Share this post


Link to post
Share on other sites

Like @Veganic writes, or just a simple ladder AND_E instruction that compares something (e.g. steppermotor_in_position) with "TRUE"... If it's a steppermotor value, just do "GT" instruction to check for greater than some value... "LT" = LessThan... and so on...

Share this post


Link to post
Share on other sites

What signals are you using from PLC to control the stepper? 

Share this post


Link to post
Share on other sites
On 26.2.2019 at 1:19 PM, Cristian Sulighetean said:

Hello everyone,

I am new to Mitsubishi PLC. My device is  IQ-F series FX5u-80 and GX Works 3 to set up parameters using ST.

I need to implement a function that waits for a confirmation signal in order to continue to the next step of the program. 

I though about another way by using a delay function instead of confirmation single for testing purpose

Why you dont use IF ..... THEN ? like:

 

IF ConfirmationSignal THEN

     NextStep:=TRUE;

     ELSE

     NextStep:=FALSE;

END_IF;

IF NExtStep THEN

     NExtNextStep:=TRUE;

     ELSE

     NExtNextStep:=FALSE;

END_IF;

Share this post


Link to post
Share on other sites

I've tried and it works perfectly for about 90% of the times. One thing that I need is to make the program wait for 2 seconds when I activate the vacuum to catch the workpiece .

I thought about verifying that the signal of the sensor that confirms the workpiece is 1 for more than 1 second if it is possible.  

Share this post


Link to post
Share on other sites

There is a big difference in making "the program wait for 2 seconds", and making "a sequence wait for 2 seconds". My guess is that you are looking for the second option (Making the sequence wait for 2 second). See image below for Timer (TON) functions. Image is straight from the manual.

Do you have e-Manual Viewer? In the FX5 Programming Manual, all instructions are available.

Capture.PNG

Share this post


Link to post
Share on other sites
On 2.3.2019 at 11:06 AM, Cristian Sulighetean said:

I've tried and it works perfectly for about 90% of the times. One thing that I need is to make the program wait for 2 seconds when I activate the vacuum to catch the workpiece .

I thought about verifying that the signal of the sensor that confirms the workpiece is 1 for more than 1 second if it is possible.  

Try this:

Local Label:

StartBit                 Bit              VAR

TimerStart           TON           VAR

OKBit                     Bit             VAR

ProgramBody:

TimerStart(IN:= StartBit ,PT:= t#2s ,Q=> OKBit)

 

 

Share this post


Link to post
Share on other sites

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