The Scope function is one of my favorite tools in the FREE SureServo2 Pro software suite.
And it’s super easy to use. Let’s put the encoder’s pulses on channel 1 – the
yellow channel. And the position in Pulse User Units on channel 2. And let’s change
that to red to give us some contrast. Remember that while the Servo motor’s encoder
has over 16 million pulses per revolution, the drive defaults to 100,000 user pulses
input – which we call “PUU” - to get one revolution via the electronic gearing.
There’s a whole video showing you how to use electronic gearing, so we won’t get
into that here. Each of the eight channels has resources allocated
to display 16-bit numbers. The scope recognized that we are asking it to display a 32-bit
number, so it automatically closed out the channel 3 and gave those resources to channel 1 so
it could display this 32-bit number. And it also closed out channel 4 and gave its resources
to channel 2 – another 32-bit number. These check marks tell us these are 32-bit channels.
If I manually turn that off, then channel 3 becomes available, but that will mess things
up so let’s turn I back on. Channels 3 or 4 can only be used for 16-bit
numbers or to augment channels 1 and 2. These channels work the same way – you get
four 16-bit channels or you can combine 5 and 7 and/or 6 and 8 to get 32-bit channels.
Let’s collect 20 seconds of data, disable the unused channels, and hit run and rotate
the motor shaft roughly one full rotation, then another full rotation, then back one
rotation, and another. Then hit stop. This button automatically optimizes the display.
We see the actual encoder on the motor climb to 16 million, then wrap back to zero as we
rotate past one full revolution. Exactly what we expect to see.
If I click to put a cursor at the start of one of those cycles and then move my mouse
to the start of the next cycle, we see the position changed the 100,000 pulses that our
electronic gear ratio is set to. And it keeps counting up while the encoder wraps back to
zero. Looks like it started here and went up to
here – which are the two revolutions we did. Perfect.
So this column is the scale for the yellow trace, while this one is the scale is for
the red trace. We can click on this guy to make all scales the same. Now the couple hundred
thousand of the position data is dwarfed by the 16 million sizes of the encoder data. Click
on this guy to get back to independent scales. Or click on this guy to optimize the display.
The independent axes are a huge help when you are trying to compare traces with little
numbers with traces that have big numbers. You can zoom in and zoom out using these guys
or you can draw around the area you want to zoom in to.
And this keeps track of changes
you make so you can quickly get back to a previous screen.
Let’s do another example. I set up the drive in position register mode to automatically
rotate this 4-pound pulley clockwise 4 revolutions,
pause for half a second, rotate counter clockwise
for four revolutions, wait half a second and then repeat that indefinitely. The first path
is set up to accelerate and decelerate over 15 milliseconds. The second path is set to
ramp over 250 ms. Check out the Position Register Mode video to learn how to set all that up.
I haven’t tuned this drive yet, but when I enable the servo and trigger the path, to
the naked eye everything seems to be working fine – right?
Let’s find out. Let’s have the scope track the commanded position which is what we told
it to do and also monitor the actual position which is the same trace that we had in the
last demo. I also have the commanded speed and actual speed being tracked but not shown
yet. Let’s run the scope and I’ll enable the
servo for a few cycles. Ok, that’s enough for now. Stop the servo and stop the scope.
I’ll hit this button to optimize the display and this one to get them on the same scale.
We’re looking at position and sure enough the commanded position changed from zero to
400,000. But the actual position overshot what we asked for! Do you want the bit on
your CNC missing the mark by this much? Probably not! Most people will simply slow the system
down for better accuracy. We can see that on the second path where we had slow ramps
– yep, no overshoot there! Does that mean we have to give up speed to get accuracy?
No, it doesn’t. Before I show you how to fix that, let’s
look at the speed command and actual speed. I’m going to optimize the display to expand
everything to full screen to make it easier to see.
We see the speed accelerated up to speed in around 80 or 90 ms – we asked for 15. And it
overshot the 1500 RPM we asked for in an effort to make up for the lost time and try to hit
the position in time. We also see the purple actual speed didn’t track the blue commanded
speed very well at all, did it? We can see on the path with slow
ramps, that it didn’t quite finish the 250ms acceleration ramp we asked for before
it had to start decelerating. So that tells us our ramps are too long – we’re never
getting up to speed which means we are wasting time. We will want to speed up those ramp
times a bit but we don’t know how much we can speed them up until we get rid of the
overshoot issue. So, let’s see if we can fix the position
overshoot issue by doing an auto tune. There’s a whole video showing you how to do that,
so I’ll just fast forward through that for this video.
Ok, I ran auto tune – it took a whole 80 seconds to complete. Let’s update the
parameters and see if things look better now. Run the scope, execute a few cycles of our
motion, stop the scope, and zoom in. And look at that! The red actual position gives us
a nice smooth landing with no overshoot. Perfect! And if I bring back up the speed command and
the actual speed we see they are tracking each other perfectly now. Yeah, auto tune on
the SureServo2 drive is one of the best I’ve ever seen. It does an amazing job.
So how cool is that? Using this scope function, you can actually see what’s going on
and make intelligent decisions about how to fix things without having to resort to
the trial and error guessing game. The insight this scope tool gives you into how your system
is working is incredible. For example, could you now go in the PR mode
configuration and start tweaking loop gains and watching in real-time how that impacts
your system? Sure! Again, no guessing – you see immediately the impact each change has
on your system in real-time. And there are so many other things you can
monitor, you are really only limited by your imagination. It’s crazy how much visibility
this gives you into exactly what your system is doing.
There are a few things to be aware of. First, you CAN monitor digital I/O – just
know that it is a combination of all the bits. So if digital input 0 changes, then the trace
will only change by 1. But if digital input 8 changes it will change by 256. If they both
change the trace will change by 257. Can you also monitor the individual bits?
Sure! Just double click on the data box and you see a breakout of all of the individual
bits for ANY parameter, not just the digital I/O. It automatically shows you all 32 bits
if that’s what you are looking at. And if you double click again, you see the hex version
of the data. Double click a third time to clear the display.
You can save the scope data to disk as just the scope data OR scope data AND parameters.
That way when you load the scope data using this guy, you know the drive is in the exact
same state as when you captured the scope trace.
Those are binary files so you can’t import them into a spreadsheet, but look at this.
If you right-click on the scope, you get a menu where you can take a screenshot and
save the scope as a text file that CAN be imported into excel. It looks like this: where
you see the software version, what each channel was recording and the data for each channel.
When I import it into excel it looks like this. One caution: this dumps the entire buffer.
This one was 160 thousand lines long, so be patient – it takes a while for the PC to
transfer or really do anything with this much data.
These guys simply enable or disable all of these channels.
You can select how you choose each item to view here. You can select via the normal English
terms we’ve been using, or you can select what you want to display by parameter address,
or by parameter group and number. This one allows you to use the scope to plot any of
the things you can see on the drive's LED display. Table 8-3 in the user manual lists all of
those LED displays. You just enter the decimal number of the display that you want to monitor
on the scope. The cursors are simple – click at one point.
Now when you move the cursor it tells you the difference between the point you clicked
on and where you are now for each trace. This says to keep the most recent 40 seconds
of data for example. And this says sample the data 8000 times per second. You can double
the sample rate, but you lose half the channels when you do that.
Change the color of each trace by clicking on the color box.
Change the scope properties by clicking on preferences where you can disable gridlines,
change the color of the grid, change auto-adjust, etc.
If you need more scope area, then unpin this side of the scope so it only pops out when
the mouse cursor is over there. If you want it to stay up, then just re-pin it.
Of course, you can zoom in, zoom out, print, and clear the screen.
You can also select the background color and the scope screen color. Just know that when
you save data, it only saves the data, not the formatting. So when you open a saved
file, it comes up in the current color scheme. Well that ought to be enough to get you started
with the SureServo2 Pro Scope function. It really is amazing that this software contains
so many high-end features like this and it is still completely free. That’s crazy!
Just go to AutomationDirect.com and search for SureServo2 Pro to download it right now.
Click here to see more SureServo2 videos. Click here to subscribe to our YouTube channel
so you will be notified when we publish more videos like this and click here to learn about
AutomationDirect’s free award-winning support options.