(VID-DH-0009) - How to use the Do-more PLC and Do-more Designer Software in a DirectLOGIC PLC System - Live demo showing you how to setup the CTRIO2 and Do-more processor and how to implement a JOG function. *** NOTE *** This video uses the single scan $FirstScan" bit "ST0" to enable the AXCONFIG instruction. The AXCONFIG instruction should be given multiple scans to complete (as indicated by red triangle in upper left corner of instruction box) and your code should not proceed until the success bit is set. The Stage Programming example in the instruction help is a great way to do that.
The Do-more and the new CTRIO2 module take all of the hassle out of programming motion, and it is so easy. For these examples we have A Stepper motor driving a threaded rod which pushes a carriage along a rail. There is also an encoder and a Proximity sensor that we’ll in some of the videos. Check out the hardware video for a list of all of the parts we used and a wiring diagram. Let’s do the JOG Function. I went ahead and set up a new online project for us to use. Step 1: You need to configure the module. There’s a number of ways you can do that. You can say right click, system configuration. Or, PLC system configuration. Or the easiest thing is just hit the System Configuration Button. In here we want to modify the Module Configuration. So I click on Module configuration and I see all the modules in my rack. Well in this rack we only have the one CTRIO. So we type in a name here – I’ve already done that CTRIO_Demo, and we configure the IO. Here are all of my Inputs, here are all of my outputs. I want to dedicate outputs 0 and 1 to a pulse and Step direction output. I can un-assign them, pulse/direction – whatever I want. That’s all we need for now, is to assign these two to drive the stepper motor. So that was Step 1: Module Configuration. Very easy. Step 2: We need to setup our Profile. Well, in the Do-more Designer, there is a command called the CT Axis Configuration and we just fill in the blanks. Here we put the CTRIO Module we want to use. Of course, we only have one in the system, so that is easy. We say what is the minimum frequency – what is the minimum frequency we are going to start issuing pulses at? What is the maximum frequency we want to achieve? This stepper motor has 20,000 pulses per revolution. So let’s make out maximum frequency 200,000 which will be 10 shaft revolutions per second. Let’s make our acceleration rate 400,000 so the shaft will be fully accelerated in half of a second. We’ll make the deceleration rate the same. We don’t have any encoder feedback in this example. And we do want to initialize the output position at zero when we first start this. So that’s our profile. We’re going to start at this minimum frequency, ramp up to this maximum frequency – which is 10 shaft revolutions per second - at this acceleration and this deceleration. And let’s see – we want to issue that command on the first scan. So step 1 was configure the module. Step 2 was setup the profile. And for step 3 – it is time to Jog the motor! To do that, we use the Counter Timer AXis mode JOG function. All we need to do is specify the output device – of course we only have one in our rack, so we select that one – and we are ready to go. That’s all there is to it. We need to control this function so I’ll have X0 enable the JOG. And we’ll have X1 be the forward direction, and X2 be the reverse direction. So one more time, we had to configure the module here. We had to setup our profile. And then we just issue the JOG command. This little red triangle reminds us this is a fully asynchronous command – we don’t have to do anything else – it does all the work for us. So let’s try it. Let’s accept all the changes. Let’s save this. I’m going to save this as my JOG DEMO. And write it to the PLC. When we initially run this program, the Config instruction is going to zero out the position. So I’m going to flip this thing to stop and then back to run and sure enough the position went to zero. Now if we enable JOG with X0, and I flip the forward switch, the carriage ramps up and ramps down. Hit the reverse switch. It ramps up to speed and ramps back down. That’s it. It doesn’t get any easier. PLEASE make sure your CTRIO2 firmware is up to date. Use the live update under Help – Check for Updates to make sure you have the latest files. I do so there is nothing listed here. Once you have done that, go to PLC, Monitor CTRIO Module and right here you can update the OS. If there is an asterisk next to that number, that would tell me it is out of date. I would hit this button and update the firmware on the CTRIO module. Well, that’s all there is to implementing JOG using the Do-more and the CTRIO2. Be sure to check out the other videos in this series for more on using motion with the Do-more and the CTRIO2. And as always, please send us any comments you may have, we appreciate the feedback. Spend Less. Do-more. From AutomationDirect.