Part 6 of 8, In Part 6 of this video series on Motion Control I will cover the DirectSOFT5 ladder logic and IBox instructions that will be used to make setting up and executing the motion move profiles very simple.
Take-away PDF and three application software projects can be found below.
Storyboard Handout take-away:
DirectSOFT5 Project File take-away:
CTRIO Project file take-away:
C-more Micro-Graphic Project File take-away:
SureStep User Manual: https://bit.ly/r5dgUO
Starting with Steppers, Part 1: https://bit.ly/J5U0tN
Starting with Steppers, Part 2: https://bit.ly/IQSjUb
Check out all of our videos at https://www.AutomationDirect.com/Videos
To subscribe: https://www.youtube.com/user/automationdirect?sub_confirmation=1
**Prices were valid at the time the video was released and are subject to change.
In this video I will cover the DirectSOFT5 ladder logic and IBox instructions that will be used to make setting up and executing the motion move profiles very simple. I’ll start creating my ladder logic by first opening the DirectSOFT5 DSLaunch application as seen here. I select ‘DirectSOFT5 Programming’ under the menu tree’s ‘Application’ folder. The ‘New Project’ dialog window will open. I’ll use ‘motion control demo – directsoft5 project’ as my project name. I select the ‘DirectLOGIC 0/1/2/4/350’ for my ‘Family’ and then the ‘DL 05’ for my PLC ‘Type’. I then click ‘OK’ to accept my selections. Next I’ll ‘Import’ the Comma Separated Values file that I created earlier in the CTRIO Workbench utility. This will save me time by eliminating me having to type in each of the ‘Nicknames’ for the CTRIO module’s inputs and outputs. Here I open the ‘Import’ utility under the ‘File’ pull down menu and select the ‘Element Documentation’ task. This will open the ‘Import Documentation’ window. Within the ‘Import Documentation’ window I can now select the ‘motion control demo – ctrio workbench tag names.csv’ file that was created earlier. Make sure the ‘Import Method’ radio button for ‘Merge (.PRJ priority) is checked so that the new data is imported without overwriting the existing data. I now click the ‘Open’ button and a progress bar as seen here will show the data being imported taking place. After a few seconds the ‘Import’ will be complete. As seen here, I can verify the new ‘Nicknames’ are available as viewed in the DirectSOFT5’s ‘Documentation Editor’. I’ll use the ‘CTRIO Config’ as my first IBox instruction. I identify the CTRIO module as ID number zero by typing in constant ‘K0’. The CTRIO module is located in the expansion slot of the DL05 PLC, designated as ‘Slot 1’, so I enter constant ‘K1’. I use V-memory register V2300 as the instruction’s ‘Workspace’. The DL05 PLC I am using does not have the ability to be a remote base, so I check the radio button for ‘Local Base’. I continue with the instruction’s ‘Input’ starting address by entering memory register V2400. Please recall that I assigned V2400 in the CTRIO Workbench utility as my starting address for the ‘Input Map’ in the ‘I/O Map’ dialog box, and the usable range in the CTRIO module is V2400 thru V2425. Next I work with the instruction’s ‘Output’ starting address. Again recalling that I had assigned V-memory register V2430 in the CTRIO Workbench utility as the starting address for the ‘Output Map’ in the ‘I/O Map’ dialog box, I enter V2430. The working range within the CTRIO module will be V2430 thru V2461. Once you accept the ‘CTRIO Config’ IBox instruction and reopen it for editing, you will notice the ‘Output’ is now shown as ‘Out0_Param3’. This is the imported ‘Nickname’ that was assigned to ‘Output’ v-memory register V2430 in the CTRIO Workbench utility. Next I’ll add the ladder logic and IBox instructions that will ‘Load’ the ‘Motion Profiles’ that I have created in the CTRIO Workbench utility. I’ll use the Axis Homing profile as my example. I’ll enable my ‘CTRIO Load Profile’ IBox instruction using a ‘positive differential leading edge one-shot’ triggered from a push button on the C-more Micro-Graphic panel that is represented by an internal relay bit addressed as ‘C0’ in my DL05 PLC. Using the ‘one-shot’ executes the ‘CTRIO Load Profile’ instruction for just one CPU scan so that it is only used when the axis homing function is first initiated. I assign the instruction to use CTRIO module ‘0’, which is the only CTRIO module in my DL05 PLC. I enter constant ‘K0’ as the ‘CTRIO #’ in the assignment box. I also enter constant ‘K0’ for the instruction’s ‘Output #’ assignment to specify which output on the CTRIO is to receive the profile. In my case this is ‘Output 0’. The predefined axis homing profile, if you recall, was assigned to ‘File # one’, so I enter constant ‘K1’ for the ‘File #’ assignment. The ‘CTRIO Load Profile’ IBox instruction requires a V-memory register to use as workspace, and a couple of internal bits to use as status flags. I use register V2301 for the instruction’s ‘Workspace’ and internal control relays ‘C10’ and ‘C11’ for the two ‘flag’ bits that will let me know that the instruction has executed successfully, and also that there were no errors. The other move profiles I created in the CTRIO Workbench for jogging, the Trapezoid move, and the S-Curve move, all are done in a similar manner. Each move profile will require a separate ‘CTRIO Load Profile’ IBox instruction, and the ‘File #’ assigned needs to match what was programmed into the CTRIO module. Keep in mind that the ‘Workspace’ V-memory register, and the internal relay ‘Success’ and ‘Error’ bits, need to be unique for each IBox ‘CTRIO Load Profile’ instruction. Once I have all of my ‘CTRIO Load Profile’ instructions programmed, my next step is to create the ladder logic that will examine the signal from the push button on the C-more Micro-Graphic panel for the respective profile, and use that signal to trigger the execution of the active move profile. Continuing with my ‘Home Axis’ profile, I create a ladder rung as seen here that enables the CTRIO Output, control relay bit ‘C12’, and sets the direction of the stepper motor, the ‘Out0_Dirction’ signal from the CTRIO module, bit ‘B2456.4’. The rung is conditioned so that profile file #1 has to be loaded successfully, relay bit ‘C10’, with no errors, relay bit ‘C11’. The ‘Home Axis’ push button on my C-more panel, relay bit ‘C0’, is pressed. The axis is not sitting on the ‘Home’ proximity sensor, relay bit ‘B2425.2’, nor is the axis at either the left or the right over travel proximity sensors, PLC inputs ‘X0 or ‘X1’ respectively. With all the conditions met, the ‘C12’ homing signal and direction reset signal, bit ‘B2456.4’, will be energized, and the rung latched in through the ‘Out 0 Active’ signal bit ‘B2425.8’. When the ‘Homing’ profile is completed, the ‘Out 0 Active’ contact, bit ‘B2425.8’, will open and drop the latch-in. Now that I have the ladder logic with the separate conditions to indicate that I am calling for a move profile to take place, I need to tell the CTRIO module to execute the profile that has been loaded by enabling the CTRIO’s Mapped Output Function bit ‘B2456.0’, labeled ‘Out0_EnablOut’. As shown here are the five possible moves that I am using in my demonstration. They include Homing, Jog Right, Jog Left, the Trapezoid move, and the S-curve move. Each of the five possible profile moves include the proper left and/or right over travel signals that will disable the CTRIO’s output if the linear lead screw slide travels too far in the commanded direction. Once I have all of my ladder logic done, including my IBox instructions, and the entire project is well documented, I can then ‘Export’ all of my Element ‘Nickname’ data in a ‘CSV’ file format that can then be ‘Imported’ into my C-more Micro-Graphic panel, which I will explain in the next video. As shown here, under the ‘File’ drop down menu, locate the ‘Export’ category, and click on the ‘Element Documentation…’ item. The ‘Export Documentation’ dialog window will open. I create a file name, which in my case I use ‘motion control demo – directsoft5 project.csv’. Because I plan on using the ‘CSV’ file with my C-more project, I check the radio button for ‘C-more Format’. I click ‘Save’ when I am ready. The file will be ready for importing into my C-more panel project when I get to it, and will eliminate possible typo errors. Please note that a complete commented DirectSOFT5 project for the Motion Control demo presented here is available for downloading from the LEARN site. Just look for the note below the video that mentions ‘take-away training PDF’s and Demo projects’, click on the title, and look for the ‘Drives/Motors Video Training Take-away documents and demo projects’ category. In Part 7 I will cover the setup and programming of the C-more Micro-Graphic touch panel that I have chosen to use as my operator interface for the Motion Control demo. Motion Control – VID: L-PC-DL-STP-001-6 Part 6 of 8 – DirectSOFT5 Ladder Logic, IBox CTRIO Configuration, IBox CTRIO Load Profiles 0 1