Autor Thema: Motor control with interrupts  (Gelesen 6283 mal)

Offline NickA

  • Newbie
  • *
  • Beiträge: 3
Motor control with interrupts
« am: Oktober 07, 2021, 13:48:24 Nachmittag »
I have a project where I have a revolving cylinder that needs to pause every 90 degrees, for 20sec.
We are setting up a mount with three proximity sensors and tags every 90 degrees on a drum triggering the corresponding 1,2,3 and 4 positions.
The sensors should ensure the motor stops when the tags cover the sensors.
I'm new to Easysoft, and I'm trying to work out best practice, with controlling outputs.
I can create a pause using a Timer on an inverted output 1, whilst in normal operation it would be held high, and therefore rotating.
Is it good practice to "override" an output?  I'm currently simulating this using FBD, which maybe my problem as I cannot determine a sensible way to interrupt the output control line.
Any help gratefully received.

Thanks
Nick

Offline Eulhofer

  • Full Member
  • ***
  • Beiträge: 107
  • Man ist nie zu alt neue Dummheiten zu begehen...
Antw:Motor control with interrupts
« Antwort #1 am: Oktober 07, 2021, 14:29:09 Nachmittag »
Hi Nick,

it is never a good idea to control an output more than one time in a plc program.
The better way is to make all the logics, conditions and tests and use a suitable quantity of bits to store the result.
At last link up these bits in the desird logic to contol the output.

If you show us your software you will get some more granular hints.

Feedback is welcome...
Erste Gehversuche mit der EasyE4 - nachdem ich jahrelang auf der Schneider/Telemecanique TSX-Micro programmiert habe....

Offline NickA

  • Newbie
  • *
  • Beiträge: 3
Antw:Motor control with interrupts
« Antwort #2 am: Oktober 07, 2021, 15:31:53 Nachmittag »
Thanks Eulhofer,
This is the current version after pushing a few ideas around and not getting the desired result. I think I've taken the wrong approach with the timer, as its following the input, which it will not be able to do in reality. 

Thanks,
Nick

Offline Eulhofer

  • Full Member
  • ***
  • Beiträge: 107
  • Man ist nie zu alt neue Dummheiten zu begehen...
Antw:Motor control with interrupts
« Antwort #3 am: Oktober 07, 2021, 16:18:22 Nachmittag »
Hi Nick,

OK.
Some question:
I01, I02, I03 are the three proximity sensors?
I08 is ON/OFF?
Q01 is the motor? Only running in one direction?
Are the steps always in the same row: position1 than 2, than 3, than 4, than 1... and so on?
Position 1 is the init position?
What is between position 1 and 2? All three proximity off?

What shoud happen/be, if you have to /or something interrupt the revolving?
Erste Gehversuche mit der EasyE4 - nachdem ich jahrelang auf der Schneider/Telemecanique TSX-Micro programmiert habe....

Offline NickA

  • Newbie
  • *
  • Beiträge: 3
Antw:Motor control with interrupts
« Antwort #4 am: Oktober 07, 2021, 16:34:46 Nachmittag »
I01, I02, I03 are the three proximity sensors? Yes they are the proximity sensors

I08 is ON/OFF? Yes that would be a primary control at this point. it will eventually be a momentary push button

Q01 is the motor? Only running in one direction? Q1 is the motor output only running in a single direction.

Are the steps always in the same row: position1 than 2, than 3, than 4, than 1... and so on?   In normal operation, yes it is, however its possible that a proximity sensor is occasionally missed.  I therefore did not want to add logic that expressed an order.
 
Position 1 is the init position? Position 1 is the initial and hold position, once it has achieved a single full rotation.

What is between position 1 and 2? All three proximity off?  There should be no proximity sensors active between any position.

Small tags are positioned on the rotating drum, and will pass over the proximity sensors.  Triggering the sensors should immediately stop the motor, for 20seconds and then move on.  It could be achievable with a single promixtry sensor, but using three allows for greater control and fault diagnosis.

Thanks,
Nick

Offline Eulhofer

  • Full Member
  • ***
  • Beiträge: 107
  • Man ist nie zu alt neue Dummheiten zu begehen...
Antw:Motor control with interrupts
« Antwort #5 am: Oktober 08, 2021, 18:11:20 Nachmittag »
Hi Nick,

look at this...
Erste Gehversuche mit der EasyE4 - nachdem ich jahrelang auf der Schneider/Telemecanique TSX-Micro programmiert habe....