Sign in to follow this  
Followers 0
LeonidasKyrgios

Two outputs with two 1 hour timers

5 posts in this topic

Hello guys.

I am working on a project than controls two motors.I am using fx1 plc with gx developer.What I want to do is simple but I am stuck. I want to activate the first motor for 1 hour then  automatically deactivate the first motor and activate the second motor for 1 hour.After 1 hour again activate the first motor and deactivate the second.I want to do this loop until I press Stop and deactivate both.

My problems: I fund a way to loop 2 timers and do the job great but gx developer don't let me set the timer up to k36000(1hour).Then I try The same method with counters.I am able now to count 1hour but with counters it won't do the loop now.

Could you please help me anyone?

 

Share this post


Link to post
Share on other sites

Hi Leonidas.

Firstly welcome to the forum. 

Im not 100% sure on GX Developer; but certainly IEC Developer and GXWorks 2/3 there is a PLC Parameter to enable timing over a certain threshold. 

The other option is to roll on another timer...then clear them down when finished.

So you want to count 36000 in a counter?

Edited by collinsd70

Share this post


Link to post
Share on other sites

Rolling another timer is not what I want since I want to display the time in a hmi.

I will download gx work 3 and see if I can set my timer to 1hour.

I want to count 60 minutes.I know how to do it but I don't know how to loop two counts.

Start:Motor 1=ON for 60 minutes.After 60 minutes Motor 1=OFF and Motor 2=ON for 60 minutes,After 60 minutes again Motor 2=OFF and Motor 1=ON.

This loop will work all the time until I press Stop and turn off both motors.

 

 

Share this post


Link to post
Share on other sites

Once you have made the configuration change you could configure 2 Time on Delays.

With your start button- start the first timer, on the completion flag (timername.Q) start your 2nd timer. On completion of timer2 (timername.Q) restart timer1.

timer1 running runs motor 1

timer2 running runs motor 2

stop button should clear any set bits down to zero and have the sequence back to the start.

The timer value can be displayed on the HMI using your 'timername.ACC'

The above assumes your using an IEC compliant language. If your in old school mitsubishi land...you just need to examine the 'T#' number. 

Once you have this working- you can then start considering interrupts (such as Emergency Stop) obviously the motor will stop- but perhaps you will want the count to remain and continue when the start button is pressed.

Edited by collinsd70

Share this post


Link to post
Share on other sites

The counter method might not be looping because you are not resetting it?

There are internal pulses at 1sec and 1 min, M8013 and M8014 respectively.

Use C1 to display time accumulated in seconds

  M1   M8013
--| |--|^|---------------------------[C1 K3600]--

  C1
--| |----------------------------+---[ALT M2]---
                                 |
                                 +---[RST C1]--

  M1     M2
--| |-+-| |----------------------------(Motor 1)-
      | M2
      +-|\|----------------------------(Motor 2)-

 

OR

Use C1 to display time accumulated in Minutes

  M1   M8014
--| |--|^|---------------------------[C1 K60]--

  C1
--| |----------------------------+---[ALT M2]---
                                 |
                                 +---[RST C1]--

  M1     M2
--| |-+-| |----------------------------(Motor 1)-
      | M2
      +-|\|----------------------------(Motor 2)-

 

I don't know what the accuracy will be over time and also worth checking it is not 59 or 61 minutes.

 

Edited by Veganic

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
Sign in to follow this  
Followers 0