Servo Motors

scottmurphy

Member
Join Date
Oct 2004
Posts
363
Does anyone out there have any experience with trio motion for servo controllers. I have an application that I want to modify, but want to get some decent background before I proceed.
 
I've used about a 1/2 dozen over the years. All MC202s, except one MC206 on a project where I needed more I/O. Great controller for the money... (y)

🍻

-Eric
 
That sounds promising, did you use the MCW card option?

I can do the basic IO stuff to / from the card, but am wanting to set an idle speed. The current setup has an idle speed, but once line speed is above idle speed runs at line speed. Understanding some of the commands is where I am struggling, I have not had any training as yet on this gear, I know training is the best way, but if I can pull it off all the better.
 
I don't know what the 'MCW card option' is, so I guess the answer is "no"... ;)

I had no training on these, but I did get some help from my distributor. I'm not sure what you're trying to do. Is the servo running at some minimum speed and you need to ramp up to match line speed? A few years back, I did an application where I had to not only ramp up (from zero) to match speed, but also match position on a timing screw. Similar to a flying shear. If I remember correctly, it was all done with one instruction... :cool:

If that's similar to your application, I'll dig out my Trio folders later today (it's bedtime for me) and refresh my memory.

In the meantime, look at the example programs in the downloads section of their website... :nodi:

🍻

-Eric
 
I will give myself a slap on the wrist, I never thought about looking up their website, I will have a gander now.

The mcw card has a tokenised form of basic that controls different programs based on different conditions.

The system works fine for what they want at the moment, servo operates at idle speed when below line speed, then when above line speed, runs at line speed, what I want to do is add a condition to leave it at idle speed until I want it to run at line speed.

Understanding the terminology of what is already running is the issue I am facing, it does make sense, but to modify it could be a bit tricky.
 
Hi Eric

Did you manage to dig out your trio files? I had a look at the website, all that was there was simple enough, nothing that looked like the application that I have here though. I have contacted the supplier, but they are also busy and are going to have a look as soon as they get a chance.

Thanks for you help

Scott
 
Any chance you can post the code that you want to modify? It sounds like a simple modification, but it would help to see what already exists... :nodi:

Here's the code I used to ramp a servo motor to match a reference speed from an encoder. I added comments to explain what each instruction does.
start:
WAIT UNTIL IN(1)=0
WAIT UNTIL IN(1)=1 'look for the leading edge of the position reference
MOVELINK(15,30,30,0,1,1) 'ramp up to match speed
MOVELINK(175,175,0,0,1) 'match speed for the remainder of the move
WAIT LOADED 'when second MOVELINK is loaded, this means that we are 'at speed'
OP(9,ON) 'turn on an output to indicate axes are synchronized
MOVELINK(15,30,0,30,1) 'decelerate to the end of the move
WAIT LOADED 'when the decel MOVELINK is loaded, this means we are decelerating
OP(9,OFF) 'turn off output
WAIT IDLE 'wait until motion is done
WA(100) 'wait a bit more
SPEED=500 'set return speed
ACCEL=3000 'set return accel
DECEL=3000 'set return decel
MOVE(-205) 'move to starting position
WAIT IDLE 'wait until starting position is reached
GOTO start 'return

This application was, believe it or not, a machine to automatically place maraschino cherries into plastic soda bottles (THIS 'novelty' soda). The bottles moved inline through a timing screw, and we dropped one cherry into 6 bottles at a time. The 'cherry dropping' carriage had to follow the neck of the bottles EXACTLY while the cherries were dropped. I used an encoder off the timing screw drive as the speed reference, and a simple proximity switch as a position reference. We were able to keep up with a line speed of 300+ bottles per minute... :cool:

🍻

-Eric
 
Ok, your code looks slightly different, but not to worry.
I will paste in the bits of code which I think I neeed to modify

rest:



GOSUB calc_connect_ratio



motion_start:



WAIT UNTIL READ_BIT(servorun,digitalinputs) = 1





P_GAIN = 0.035 : I_GAIN = 0.0004 : D_GAIN = 0

VFF_GAIN = 0 : OV_GAIN = 0



DEFPOS(0)

WDOG = ON

SERVO = ON

CLUTCH_RATE = 200



' this connects the servo axis to the encoder axis ( Pulse Train )

' at the calculated ratio



CONNECT (connect_ratio,1)

PRINT connect_ratio







wait_input:



IF READ_BIT(idlemode,digitalinputs) = 1 THEN



' Calculate the limits that the servo speed is allowed to wander in during

' print idle



VR(digitaloutputs) = 0

idlelower = VR(idlespeed) * 0.95
idleupper = VR(idlespeed) * 1.05




IF (VR(speedfeedback) < idlelower) THEN

BASE(2)

ACCEL = 10000

DECEL = 10000

IF(MTYPE = 0) THEN

REVERSE

BASE(0)

ADDAX(2)

BASE(2)

ENDIF

IF VP_SPEED = SPEED THEN

SPEED = SPEED + 100

ENDIF

ENDIF



IF (VR(speedfeedback) > idleupper) THEN

BASE(2)

IF VP_SPEED = SPEED THEN

IF SPEED > 0 THEN

SPEED = SPEED - 100

ELSE

SPEED = 0

BASE(0)

ADDAX(-1)

BASE(2)

CANCEL

ENDIF

ENDIF

ENDIF

ENDIF



There is a bit more there, that does the connect ratio calcs and registration corrections etc, but i am thinking that it is to do with the connecting to the encoder axis via the CONNECT command.



What I need to understand is the use of the VP_SPEED & SPEED commands, how are they referenced.
I have read the manual over and over, and some things are making more sense to me, but then again some are not.

The Motion Start routine isn't 'scanned' again unitl the (servorun,digitalinputs) bit is Low.

Thanks again for your help.

Scott




 
Ok that didn't come out as I planned, the nesting didn't seem to come through. I will try and attach a word copy of the file instead.

Thanks again

Scott
 
The SPEED variable is simply the requested speed. Of couse it will only be AT this speed when the acceleration is complete. VP_SPEED is, as far as I can tell, the current speed. Notice that VP_SPEED is 'read only'. SPEED should only equal VP_SPEED when the motor is AT the requested speed. IOW, when the acceleration is finished.

I'm still not sure what you're trying to do. From what I can see, I would think it wouldn't go above idle speed until the 'idlemode,digitalinputs' bit turns on. If that's true, you could simply AND a digital input to that bit as a 'permit' signal.

Replace IF READ_BIT(idlemode,digitalinputs) = 1 THEN
With IF READ_BIT(idlemode,digitalinputs) = 1 AND IN(x)=1 THEN

The 'x' in IN(x) being a spare digital input.

There are a few other guys in this forum that are familiar with the Trio stuff. See if they chime in with any ideas. I may be totally wrong here... :confused:

🍻

-Eric
 
Replace IF READ_BIT(idlemode,digitalinputs) = 1 THEN
With IF READ_BIT(idlemode,digitalinputs) = 1 AND IN(x)=1 THEN
With the idle mode bit off, the servo still runs at line speed.
If the idlemode bit is on, then the servo will run at line speed unless line speed is less than idle speed.

This is where I think the CONNECT command comes in, the virtual encoder axis is (1), and in the
statement CONNECT(connect_ratio,1)links the base axis to the encoder axis. I get this from the manual.

Notice that VP_SPEED is 'read only'
How do I know that VP_SPEED is read only, is this because
of the IF statement, it is only looking at this variable?

I guess the other option is to try and start from scratch, and build up my code in stages.
More so though, maybe a day away will give me a chance to clear my head and get some fresh ideas.

Obviously and suggestions here will be more than helpful as well.
 
scottmurphy said:
How do I know that VP_SPEED is read only, is this because
of the IF statement, it is only looking at this variable?
No, because it states it in the manual... ;)

VP_SPEED

Type: Axis Parameter (Read Only)
Alternate Format: VPSPEED
Description: The velocity profile speed is an internal speed which is ramped up and down as the movement is velocity profiled. It is reported in user units/sec.


Have you experimented with the built-in simulator? It works quite well! No worries about damaging actual equipment... (y)

I don't know if it allows you to simulate the Devicenet I/O though... :unsure:

🍻

-Eric
 
I have tried the simulator, the devicenet is not a worry, I can just substitute with other variables.

The only thing with the simulator is having to constantly hit the refresh button, unless I am doing this wrong as well.

I am going to go and start from scratch to a certain extent, then build on from there.
 
Fyi

I have been experimenting again today, and added the following code

SERVO = ON
CLUTCH_RATE = 200
CONNECT (connect_ratio,1) 'Th
PRINT connect_ratio

wait_input:

shadeidle = VR(idlespeed) / 16.68

IF READ_BIT(9,digitalinputs) = 1 THEN
CONNECT (shadeidle,1)
ELSE
CONNECT (connect_ratio,1)
PRINT connect_ratio
ENDIF
The commands above the wait_input are only processed on the first scan. So now the CONNECT command is examined based on conditions instead of always executing.

This worked fine and how I wanted it to...finally, my only issue no is what implications this may have to the servo or control card if any? I can deal with any of the real world issued within the PLC and control the switching of (9,digitalinputs).

BTW. the 16.68 is the amount of pulses per mm that the virtual encoder is generating.

Scott
 

Similar Topics

Does anyone Have any Experience with the Teknics Servo motors https://teknic.com/model-info/CPM-SDSK-3432S-RLS/ Along with using them with...
Replies
0
Views
733
Hello Folks, I teach a motors course at a local community college. We have the AC/three phase/VFD technology down but we're hearing a lot of our...
Replies
2
Views
2,382
Hello, do 3 PH AC Servo Motors ( 1S Omron) follow the same rules as regular AC servo Motors? can I use Table 50.1 (UL508) to calculate FLC of...
Replies
4
Views
2,037
Hi everyone, Is it possible to position with third-party servo motors using PF 753 or PF 755 AC drives? I know torque and speed control are...
Replies
3
Views
5,133
I just changed A servo motor and amplifier with a new servo cable but now the positions of the module are off like 7" except for 2 out of the 15...
Replies
0
Views
1,072
Back
Top Bottom