Logix Motion: blended motion question

Contr_Conn said:
Peter,
As for simulator - prototpe is working just fine, but unexpected weekend home repairs delayed it again ( only 4 years in making o_O ).
I am still trying to find a best way to add some lag using some kind of shift array, but it takes processing power from simple 8-bit microcontroller I am using.
So you are making a hardware simulator too? It looks like it. That wasn't apparent from the earlier posts.

You should use a low pass filter for the lag. A simple gain and time constant will do for most more simulations.

At highest speed it produces 62500 output pulses per second while reading analog input, calculating output speed and servicing Zero marker - not too much room left for everything else.

I will post pictures as soon as I build new prototype PCB that fits in my favorite plastic box.
An 8 bit micro isn't the way to do this. A TI DSP might do but I would use a FPGA. I know I just added another 4 years to the project.

My simulator is done in software and is a integral part of our controller so it doesn't help out anyone with another controller. They can make their own or buys yours.
 
So you are making a hardware simulator too? It looks like it. That wasn't apparent from the earlier posts.

You should use a low pass filter for the lag. A simple gain and time constant will do for most more simulations.
Yes, this is a simple hardware simulator that fits in very small box.

An 8 bit micro isn't the way to do this. A TI DSP might do but I would use a FPGA. I know I just added another 4 years to the project.
My simulator is done in software and is a integral part of our controller so it doesn't help out anyone with another controller. They can make their own or buys yours.

I am using 8-bit micro to keep cost down: chip cost less than $2 and I have all free developement tools (C, Assembler) and programming hardware.
This will let me make this simulator for less than $10 in parts!

I know I can use FPGA or DSP, but this will delay it for another 3-4 years and will bring cost through the roof.
I started with non-micro solution using TI VFC32, but now I can do it easily with one PIC18F
 
sim.jpg



I finally moved my simulator prototype to PCB that I can put in a small box.

I think this design is a simple enough (and cheap) to make and now I can continue to play with Logix motion commands.
I will move simulator discussion to a differen topic.
I got profile I want using high speed Logix peropdic task and compare instruction.
Now I will try to make a cam profile or use coordinated motion.
I'll keep you updated


Speed.jpg
 
Last edited:
Yes, simulator takes +/-10V signal.

Because Micro has only 0-5V analog input I implemented simple 3-resistor level converter for it.
Encoder output comes directly from Micro using 5V Outputs: A+/A-, B+/B-, Z+/Z-
Drive Enable signal - 24VDC.
Power 24VDC - simple regulator brings it down to 5V

I saw some simulators like this but they don't sell them for $30 or even for $100. As you see this one has less than $10 in parts with connector been the most expensive component.It nicely fits in a small box I usually use for my projects.

As for PCB - this is prototype and I can quicky make a single sided PCB in my garage.
I can easily make 0.01" traces and 0.020" SMD pad spacing.
Pepole who saw my home made PCBs never believe they are made by hand.
Once design is ready I usually buy PCBs from a different vendor.
 
Last edited:
Peter

I am not sure what Tech80 does to simulate real servo, but this is what my simulator will do with next firmware:

lag.jpg
 
Gerry said:
I think what you are looking for is the MCLM instruction (Motion Coordinated Linear Move). You can queue the moves and specify whether or not they blend.
This would still have the scan time delay from move to move wouldn't it? Or would it be the course update or neither?
 
Are you programming in C or assembly language?
You should put in a low pass filter as it will be much more realistic than a ramp.

countrate(n+1) = A * countrate(n) + (1-A) * K * control voltage

K is the count rate per volt. System gain.
A is the filter constant which is exp(-T/tau) where tau is the time constant and T is the update period.

As long as tau is much longer than T then you can approximate exp(-T/tau) with tau/(Tau+T).
 
TWControls said:
This would still have the scan time delay from move to move wouldn't it? Or would it be the course update or neither?
I've yet to use any of the co-ordinated move instructions, but from my reading a queued move has pending status which I interpret as being similar to a pending cam. i.e. the transition from the executing move to the pending move is handled by the motion planner and therefore is governed by the coarse update.
 
Coordinated motion instruction MCLM does the trick:

- it works exaclty as I described in my first post.
- it can queue multiple moves.
- it does not require second axis.

I actually found sample code within RSLogix 5000 that does exactly the same.
So original issue resolved and I can make this sample program.

Peter:
For simulator I am using C language, so I will take a look at your idea
Just not sure if PIC is powerful enough to run calculations in the short time slice I have - PIC simply not designed for this.
 
Gerry said:
I've yet to use any of the co-ordinated move instructions, but from my reading a queued move has pending status which I interpret as being similar to a pending cam. i.e. the transition from the executing move to the pending move is handled by the motion planner and therefore is governed by the coarse update.
Contr_Conn said:
Coordinated motion instruction MCLM does the trick:

- it works exaclty as I described in my first post.
- it can queue multiple moves.
- it does not require second axis.
Thanks. Very good to know. I'll have to experiment with this instruction
 
I have to add another important note
you can't just dump multiple MCLM instructions to the queue.
it's necessary to check Coord_System.MovePendingQueueFullStatus bit before next MCLM executed.
 

Similar Topics

Hey guys, On my system, i got prop valve controling cylinder on the left and right to adjust the center of a lumber before it get in a woodmill...
Replies
8
Views
936
Hello everyone, Ho do I go about making changes to a "Motion Axis Parameter" e.g. PositionScalingNumerator that is currently grayed out in the...
Replies
2
Views
1,389
I tried to upgrade my Studio 5000 v32.00 to v32.04 or higher but the install was unsuccessful due to the higher version of Motion Database is not...
Replies
0
Views
1,303
I'm using a 1769-L18ERM to control two Kinetix 5500 servo drives. I am setting up a virtual axis, which I will use the MAJ instruction to run, and...
Replies
6
Views
2,408
Hello everyone, So on Monday morning I'm expecting to have a box of random parts dumped in front of me. I'll create another thread with more...
Replies
1
Views
1,982
Back
Top Bottom