Servo program feedback

Join Date
Apr 2020
Location
USA
Posts
50
Hello,
I am new to PLC programming, and this is the first program I am have done from scratch (other than ones I have done in courses).

I am using a ML1200 to communicate to a Sure Servo Drive.

The attached program is just the beginning, as I want to make sure that I am on the right track (I will need to add several safety checks that need to happen before program will execute + there will be several more "positions").

The goal of the attached program is to send position and velocity commands to the servo drive, and to have the servo motor move to "position 1" when the Start button is pressed.

I have enjoyed learning, and welcome feedback. Am I on the right track? Any tips to improve?
 
I just did a machine with the Sure Servo (my first servo experience) And I used the Modbus as you are. I used a Micro Logix 1400. Are you using a zip link for the controls?
I did all through messaging. I don't set up my messaging to continually run as you have.
Also looks like your enable will toggle with the message DN bit if it even turns on since
you are repeating the 2 messages, IMO
I used an example on this forum to figure out how to make it work and then got better with more reading and bench testing.
If you need more help I can find some examples.
 
Minor issue: for a MicroLogix, I believe I/O is synchronous with the program scan, so the input and output subroutines will be unnecessary from a per-scan buffering standpoint, other than what they may provide in terms of labeling or readability.
 
I just did a machine with the Sure Servo (my first servo experience) And I used the Modbus as you are. I used a Micro Logix 1400. Are you using a zip link for the controls?
I did all through messaging. I don't set up my messaging to continually run as you have.
Also looks like your enable will toggle with the message DN bit if it even turns on since
you are repeating the 2 messages, IMO
I used an example on this forum to figure out how to make it work and then got better with more reading and bench testing.
If you need more help I can find some examples.

Ya, the plan is to tie the outputs from the PLC to the zip link.

The messaging is very new to me, even courses I have taken did not go into that. What is a better way to set those up? I see some examples use a timer.
 
Minor issue: for a MicroLogix, I believe I/O is synchronous with the program scan, so the input and output subroutines will be unnecessary from a per-scan buffering standpoint, other than what they may provide in terms of labeling or readability.

Thanks, and agreed, I probably over label them being my first time and trying to visualize everything.
 
This is how I cycle my comms, I know a lot of programmers suggest timers.
If you are not doing a lot of position/velocity changes there is no need to keep sending it you could set it up to only send it when a change is needed. You will notice I also read back the info so I can be sure the servo has the correct info before I trigger it to move. You can also set up your error bits from the messages to let you know if a servo is not communicating.
 
I should note that if you are setting your servo up for absolute positioning you will need to provide the home sensor and also set up the servo for how it is to implement the homing cycle. With absolute positioning you are always moving to a position referenced from home, such as a drill. When I am using the servo for an application like a belt feed. There is no need for absolute and I only give direction and how far to move
 
This is how I cycle my comms, I know a lot of programmers suggest timers.
If you are not doing a lot of position/velocity changes there is no need to keep sending it you could set it up to only send it when a change is needed. You will notice I also read back the info so I can be sure the servo has the correct info before I trigger it to move. You can also set up your error bits from the messages to let you know if a servo is not communicating.

Thanks, I will review this!

The reading sounds like something I need to add. This will be what I use to verify the motor is at Position 1 before beginning Position 2 correct?
 
I should note that if you are setting your servo up for absolute positioning you will need to provide the home sensor and also set up the servo for how it is to implement the homing cycle. With absolute positioning you are always moving to a position referenced from home, such as a drill. When I am using the servo for an application like a belt feed. There is no need for absolute and I only give direction and how far to move

I am planning to do Incremental positioning. The cycle will be a drill "peck" cycle (down, retract some, down more, retract etc).
 
I use 2 types of feedback: 1 to confirm the new position is has been sent to the servo before I tell it to move there and 2 the actual position the servo is at so I know it completed the move after I told it to move.
I ran into this on a complex machine that had multiple servos interacting and I didnt want
any comm's delay however minimal messing up my sequence
 
I personally would use absolute positioning on a drill. This way all movement is based off of the home position (Drill all the way up) and all movement positions will know which way to go without direction command.
 
Looking through the Sure servo manual I think to change direction in Incremental you would also have to change a direction parameter each move in a different direction. There is no forward/reverse except for jog. Using absolute if your position move was 2 revs +5000 (2-1/2 revolutions) it would move one way (original program direction)and if your next move was 1 rev + 5000 it would back up 1 revolution from where it was.
Each move trigger with rev/count will determine which direction and how far to move.
 
Looking through the Sure servo manual I think to change direction in Incremental you would also have to change a direction parameter each move in a different direction. There is no forward/reverse except for jog. Using absolute if your position move was 2 revs +5000 (2-1/2 revolutions) it would move one way (original program direction)and if your next move was 1 rev + 5000 it would back up 1 revolution from where it was.
Each move trigger with rev/count will determine which direction and how far to move.
 
Looking through the Sure servo manual I think to change direction in Incremental you would also have to change a direction parameter each move in a different direction. There is no forward/reverse except for jog. Using absolute if your position move was 2 revs +5000 (2-1/2 revolutions) it would move one way (original program direction)and if your next move was 1 rev + 5000 it would back up 1 revolution from where it was.
Each move trigger with rev/count will determine which direction and how far to move.

Perhaps I had the 2 mixed up. I will re-read. I thought in absolute mode, I would need to return to home position every time. That will work, just a less efficient cycle.
 
Absolute just references once and as long as power is left on it will calculate all moves from home position. in absolute if you trigger a move of 10 revs it will move 10 revs
(direction determined by initial setup) then next move is 20 revs it will only move 10 more
revs to be at 20 revs. in incremental it would move 10 revs on the first trigger and then 20 more on the second trigger and be at 30 revs
 

Similar Topics

I just purchased a new emerson EP209 servo controller and I am using Power Tools Pro V5.2. I have a USB to 485 Emerson cable. Recently I...
Replies
2
Views
1,694
I have a 1394 Servo Controller setup with RIO. All the RIO communications are working except for the program start. From what I read in the...
Replies
5
Views
7,183
Is it possible for me to tuning 2 servo at the same time, because this servo is connected by mechanical so I'm afraid that I need to tuning them...
Replies
3
Views
98
Hi all, New here and new all round to PLC`s. We have a servo drive that runs a cross travel beam backwards and forwards. I am having trouble with...
Replies
3
Views
134
Back
Top Bottom