selinrv

1ms TON and TOF GX Works 3 FX5U

14 posts in this topic

Hi everyone

I'm new to FX5U, 'cause I previously used Q-series PLC.

So, is there any possibility to make on delay timer with 1ms PT?

Share this post


Link to post
Share on other sites

Yes TON and TOF are available in de FX5

Edited by Gambit

Share this post


Link to post
Share on other sites
2 minutes ago, Gambit said:

Yes TON and TOF are available in de FX5

Yeah, I know, that they are available, but there are TON with PT 100ms and more, and TON_10 with PT 10 ms and more. And I'm in need of 1 ms time

Share this post


Link to post
Share on other sites

aha I see. Well in that case can you explain what you want to accomplish. 

Because at that speed you will also need to make an interrupt program because otherwise you'll be depended on the scan time of the PLC anyway.

The fastest timed interrupt in the FX5 is already 1 ms. 

Share this post


Link to post
Share on other sites

i need two pulsating outputs with frequency from 0,5 to 80 Hz.

And i set the frequency with TON timer for both outputs

something like this

/*0.5Gz*/
IF start=TRUE AND vhod1>1000 AND vhod1<1099 THEN
	timer1(IN:=TRUE, PT:=T#1000ms);
END_IF;
IF timer1.Q AND vhod1>1000 AND vhod1<1099 THEN
	out3:=TRUE;
	out4:=FALSE;
	timer1(IN:=FALSE);
	start:=FALSE;
END_IF;
IF out3=TRUE AND vhod1>1000 AND vhod1<1099 THEN
	timer2(IN:=TRUE, PT:=T#1000ms);
END_IF;
IF timer2.Q AND vhod1>1000 AND vhod1<1099 THEN
	out3:=FALSE;
	out4:=TRUE;
	timer2(in:=FALSE);
END_IF;
IF out4=TRUE AND vhod1>1000 AND vhod1<1099 THEN
	timer1(IN:=TRUE, PT:=T#1000ms);
END_IF;

 

Share this post


Link to post
Share on other sites

Why you can use the PLSY or PWM  instruction 

Edited by Gambit

Share this post


Link to post
Share on other sites

i tried, but my program also depends on when out1 and out2 (outputs that pulsating),

e.g.

If out1=true THEN

i'm doing something

END_IF

With PLSY out1 is always OFF (even when Y1 light is on) or i'm doing something wrong?

Share this post


Link to post
Share on other sites

sorry for upping this topic again, are there any other suggestions?

Share this post


Link to post
Share on other sites

Do you use the transistor (MT) or relay (MR) output CPU ?

Share this post


Link to post
Share on other sites

 

14 hours ago, Bryll said:

Do you use the transistor (MT) or relay (MR) output CPU ?

transistor output

Share this post


Link to post
Share on other sites

You might need to refresh your output when using time sensetive updates.

Take a look at the REF and REFP functions

Share this post


Link to post
Share on other sites
On 4-4-2018 at 7:28 AM, Bryll said:

You might need to refresh your output when using time sensetive updates.

Take a look at the REF and REFP functions

That's exactly why you should use the highspeed instructions like PLSY, PWM etc ..... they work outside of the SCAN

Share this post


Link to post
Share on other sites
On ‎2018‎-‎04‎-‎05 at 2:14 PM, Gambit said:

That's exactly why you should use the highspeed instructions like PLSY, PWM etc ..... they work outside of the SCAN

Very true, but easy to forget if you try to solve things differently.

It normally takes a while before you find the correct instructions.

Share this post


Link to post
Share on other sites

Ok. So how do i use PLSY for two outputs, so they do not overlap each other?

Like this

PWM.jpg

 

One idea was to use TIMER_1_FB_M, but I can't put a fractional number, like 6.25ms for 80Hz in timer

Edited by selinrv

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