Using a top down approach when configuring your Do-more will help make your programming effort go a lot smoother. Learn how with several different live demos in this video.
Our FREE Practical Guide to Programmable Logic Controllers eBook: https://www.automationdirect.com/ebooks/plc-handbook
In part one we learned that if you configure the Do-more from the top down, and you understand that the Do-more is device centric, then things make a lot more sense and Do-more projects just seem to flow easier. In this video we’ll use a Do-more to operate a simple box diverter like this. We’ll need a motor we can control with a variable frequency drive to manage the conveyor loads. We’ll use a barcode scanner to scan the box and tell us where to send it. We’ll use an encoder to tell us how long to run the diverter motor, which can to change with different sizes of boxes. We’ll need some Inputs to monitor the various sensors and we’ll need some outputs to control the pneumatics that lift the diverter. This is just a contrived scenario that intentionally uses a wide variety of automation hardware so we’ll have several different kinds of devices to practice setting up and configuring. We need to talk to the Bar Code scanner from the CPU’s serial port. We’ll use a high speed counter module to count encoder pulses. We’ll use the Do-more’s on board Ethernet port to talk to a variable frequency drive. And will have digital input and output modules to control the pneumatics and diverter motor and read the status of the photo sensors. I’ve already plugged the hardware modules into the base, turned it on and connected to the Do-more with a new blank project. Let’s start with the barcode reader on the serial port. In the CPU configuration we see the Serial port device already exists, so we just choose how we want it to behave. Our barcode reader just sends out ASCII text so we’ll use this as a general purpose serial port and configure the com port parameters to match those of the bar code reader. You can see the default name of the serial port device starts with an “at” sign – all devices default to that so you know the Do-more thinks it is device. This says it’s the Internal Serial Port Device. The serial port doesn’t affect the I/O Configuration, and it’s not an added module so our next stop is Device Configuration. Here’s our Serial Port Device along with all the other devices the Do-more automatically created for us. Remember – these are all devices the Do-more creates for us out of the box – we didn’t have to do anything. Some of them are ready now, and the rest we just setup a few parameters and they are ready to go to! We’re working on the serial port right now, so let’s edit that one. There’s really nothing to do here, is there? We already set all of the parameters back in the CPU configuration, so this serial port is ready to go! The serial port doesn’t affect any of the I/O mappings and if we look at the memory configuration we see the serial port heap item. That’s the chunk of memory that has been allocated automatically by the Do-more for the Serial port to use. You don’t have to worry about reserving memory or creating buffers for the serial port- the Do-more manages all that for you. We’ll take a closer look at the memory elements the Do-more creates for us in just a minute. So what did we do to get a functioning serial port? We just selected what flavor we wanted and set the port parameters. We walked through the rest of these, but there wasn’t really anything to do there was there? Easy. There’s a dedicated video that goes into great detail about how to use a Bar Code scanner with the Do-more. Check that out if you want to learn more about Bar Code Scanning. We wired the encoder to the Counter IO module –which I will also call the ‘CTRIO’ module – like this, with the encoder open collector outputs going into channel 1A and 1B and the common tied to the plus rail. Let’s go back to the top and work our way down. Does the CTRIO module have anything to do with the CPU? No. Under I/O configuration – we see that the Do-more has already found the CTRIO module here in slot 2. We didn’t have to do anything to discover this module – did we? That’s because the Do-more was in auto discover mode. If you are in manual mode you can change modules manually here if you want to. That all looks good so let’s move down to Module configuration. Here’s a list of all the configurable modules – which we only have one. Select it, click on edit and Configure I/O. We want a Quad counter so we can tell which direction the encoder is rotating and let’s call this Device “Encoder.” Hit OK and we now have a fully configured encoder device. Again, all we did was go into Module Configuration, select the CTRIO module and create a quad counter device which we named Encoder. We didn’t have to do anything special to initialize the CTRIO module. It only took us a couple seconds to fully configure our Encoder device. If we look at the Device Configuration – we see the Encoder device sitting there waiting for us to use it. Look - no configuration required – we have already done everything we need to do. You still see the CTRIO device – he’s the global device for that module that takes care of all common parameters, and there can be many sub-devices like this encoder depending on how many things you have connected to the CTRIO module. I/O mappings – we didn’t use any of the CTRIO I/O bits so there is nothing here to do. And memory configuration – if we scroll down to the bottom we see our Encoder heap item or structure – it begins with a dollar sign to differentiate it from the device which starts with an AT sign. This is the structured memory the Do-more set aside for this device – which is really cool because we didn’t have to set aside any memory for this device either did we? The Do-more literally did every thing for us. You can also see the structure for the Counter IO module itself – it contains things that are common to all devices and functions of the module like error codes, status flags, mode information, things like that. Since we’re at the bottom of the list we know we are done with the encoder configuration, so I’m gonna exit for a second and show you that over here under memory there is a list of every memory item in the entire system so we should be able to find our Encoder Structure in here somewhere right? Sure enough, under I/O, Specialty, There’s the encoder and you can seven see all the members and what type each member is – signed Dword, Real, bit, etc. Very cool. If I download these changes to the Do-more … Add a data view to monitor the Encoder, and the dot ireg1 is the register that stores the channel 1 counter data, put the Do-more in run mode, turn the encoder and just like that we see the encoder counting. And again – while I’ve been taking a lot of time to explain things - all we really did was - under module configuration - tell the CTRIO what flavor device we wanted on channel 1 and gave it a name of Encoder – that’s it. Do-more Designer did everything else for us. That’s so easy. Let’s setup the Variable Frequency Drive device on the Ethernet port first. Where do we start? Same place as before – go to hardware configuration and start at the top with the CPU and work our way down the configuration list. Enable the Ethernet I/O since that’s how we talk to the GS-EDRV100. That creates a new EtherNet I/O entry in our I/O configuration. Click on that to configure the Ethernet I/O network. You can change the Do-more’s IP configuration here, and modify slaves down here. Before you add slaves to the Ethernet I/O master list, you need to make sure they are all in the Do-more’s domain. How do you do that? Just like everything else, start at the top and work your way down. This first button scans the network and identifies all Ethernet I/O compatible devices. Let’s get this IP address on the Do-more’s network and let’s change the device name to ConveyorMotor. Remember, everything is this dialog are all items that are getting changed on the actual variable frequency drive not in our Do-more Program. Hit OK, wait for the drive to get updated and we are good to go. Now that I know all my hardware is configured for this domain, I click here to scan the network, select the ones I want to use and add the ones I selected. That’s it! Now we have a new GS1 device we can use to manage and control the GE-EDRV100 and GS1 VFD which we can see a picture of here. This guy is a smart Ethernet to RS485 converter specifically for use with the GS series drives. Under Module Configuration, there really isn’t anything to configure except the module name which we could change to Conveyor Motor if we wanted to, but I think we’ll leave it at GS1 to remind us what kind of drive we are talking to. We’re done with that. Under Device Configuration, we see our GS1 Device that we’ll use to control the drive - there is nothing to do here. Under I/O mapping we see our new Drive under the Ethernet I/O master and that the memory allocated for that guy is a structure named GS1_100 – remember, the structure you use to access a device always has the same name as that device so it’s really easy to remember! Under Memory Configuration – scroll down to the bottom – and we see our new GS1 structure – again same name as the device. Well, we are at the bottom of the configuration list, so we must be done with our drive configuration. And again, all we did was enable the Ethernet IO master, scanned for devices, and configured the GS-E-drive. And once again, the Do-more did all the heavy lifting – it created the Device, allocated the memory, built the structure, created the status flags, all that stuff. There’s a four part series of videos that goes into a lot of detail about using Ethernet I/O with GS Drives. Check out those videos to get the most out of using the Do-more with Ethernet I/O and GS Drives. Just for fun, let’s download this configuration to the Do-more and test this device. In the dataview I’ll add the GS1 Drives’s output frequency, direction and RunCommand. Simply by setting these parameters in the dataview I can control and monitor the drive. And remember – the Do-more set all of this up for me – All we did was enable the Ethernet I/O and scan for the drive. Setting up the input and output modules is easy. We’ll start back at the top of the configuration list just like everything else. These don’t impact the CPU so there is nothing to do here. In the I/O configuration we can see that the Do-more automatically identified the input module and mapped them to memory for us simply because we plugged it in. You can add modules manually by selecting this radio button, then down here right click on the slot to choose your module. I don’t have an output module yet, so I’ll drop one manually in this slot. There’s no module configuration for these guys and there’s no Device configuration for discrete I/O modules – the I/O Master takes care of all of that for us. I/O mappings – you’ll want to leave that on automatic most of the time. But, if you want to reserve memory for a future module you can always switch over to manual and force the I/O mapping to be whatever you want. Finally, there is no memory configuration for I/O so we’re done configuring all of the devices we need for our project. So think about that – in just a few minutes we completely configured this system and even ran a couple live demos and most of that time was me taking time to explain everything. Some were trivial, some were more complicated, but all of them used the exact same methodology – we click on configuration and work our way down this list. And that’s the beauty of the Do-more – it doesn’t matter how simple or complicated the hardware is that you want to talk to. If you approach it like we did with these devices, everything just falls into place and even the most complicated device only takes seconds to setup and configure because the Do-more does all the heavy lifting. That’s amazing. In this video we focused on how to configure the devices we’ll need. In the next video we’ll put these devices to use and you will get a whole new appreciation of how incredibly powerful this device centric model is … If you need any help, please contact AutomationDirect’s FREE award winning tech support during regular business hours – they will be happy to help you. And don’t forget the forums, there are lots of folks there that love to share their years of experience. Just don’t post any questions directed at AutomationDirect’s support staff there – they don’t monitor the forums on a regular basis.
Voted #1 mid-sized employer in Atlanta
Check out our job openings