Hello everyone, I'm Tom Trinh, Senior Application Engineer for Valin Corporation.
Today I will illustrate how the Beijer CODESYS Controller PLC XP-350 interface with the Parker Drive PD-04C and controlling the Parker servo motor.
OK, So what you let me go and show you real quick the CODESYS- based controller that we have. So here is the Beijer CODESYS XP-350 spec. So it has 16 digital inputs, 16 digital outputs, 5 analogue inputs to RTD which allow you to connect temperature sensor device to it. You also USB and CAN interface. There's a CAN open master interface. There's a Wi-Fi if you can connect to it via USB, There's an SQL integration, the web visualization as well. It's IEC 6O870-5-1O4 server and it is the DNV certified. So what you see in front of you here is basically the actual hardware and on here I have the USB port connected to USB to Ethernet adapter that basically allow me to program this via Ethernet. The port next to it is the Ethernet port and it's actually now an EtherCAT port and we make this as a EtherCAT master and it is connected to the Parker PD-04C EtherCAT Drive. using this cable right here. So it is connected to the EtherCAT in port of the Parker Drive. f I have more than one drive, I can connect from this port, the out port to the in port and so forth. So I can connect multiple drives. This PLC allows me to communicate and control more than one drive. OK. And what you see here is the encoder cable coming out of the drive basically connecting to this port here, which is the encoder of the servo drive. Here is the motor power which is connected here on this side right here as well. So that's where the motor drive, motor servo drive for the connect to the servo motor. And here's the cable connect to the AC120 that allows me to turn on the drive. Right now you see the drive is in run mode, meaning the servo is on. OK.
So that's basically the hardware that we have. So to program and set this up, we use a CODESYS BCS tool from Bayer, it's BCS tool, and this is free. You can download it and use it and it's free. Now I already connect it but let me disconnect it. I want to show you how to connect to it. So I'm going to select this to disconnect. So first and foremost to be able to connect to this through this USB to Ethernet adapter, you double click on device. This will show up and what you want to do is click this gateway and hit enter. So now by doing that you see how it changes from black to green. Here I basically what I just did is disconnect and then reconnect it. OK now I set up already this port to be 192.168.33.109. OK so now I'm connect it. Now at this point I'm going to go online. I can go online by either login here or select this icon. OK? It will ask you whether you want to login. I'm going to go ahead and say yes because I already download the program.
So B says to go out and connect it and if you have not download the program, it will ask you to download the program. Or if the program in your development tool is different than what it sees on the PLC, it will ask you to download it. And you have a choice whether you want to download it without a source code or with a source code. OK, I'm going to go through it for this demo. I'm just going to show you real quickly how all the Motion MC Open function block works. OK, So what I'm going to do, I'm going to go to the My User program here. OK, So what you see right now, this function block, I'm going to go through it real quick. The ladder program down here is basically just allow me to do some cycling for my testing. You see the start cycle, it's on right now and it's on every time for every two seconds, just for me to allow me to do the increment every two seconds. So what I'm going to do is I'm going to it's already turned on, right? The server was already turned on. I'm going to turn it off so you can see it. So do that. I'm going to force it to be off state. I'm going to turn on control F7. As soon as I do this, you see this will go to turn off the server. So now base block, OK, I'm going to turn it on again, control F saving it. So now it's on. OK, at this point I can so right now, yeah, that's zero, which is good. So what I can do is so that's MC power. OK, the next thing up is this is the MC RESET allows you to reset a function block. You can use this if the drive goes into error. So that's what this function block is for. There's an MC home here as well. So you can execute home. I'm not going to do that, but I'm going to go ahead and jog so you can see. So I'm jogging with a velocity of 20, acceleration 20, deceleration 20. So I'm going to force it on right here. As soon as I force it on, you see the motor moving forward. Here we go. So jogging forward, OK, I'm going to stop it, OK?
Now I'm going to tell it to jog backward by turning on this bit.Here we go. So jog backward, OK, if you look at this, I'm going to change, I can change the speed on the fly as well. See how it goes slower. OK, I'm going to turn it off. So you OK, I'm going to stop it now. OK, so now it's stopped. OK, so let's say I want this to be 0 point. So right now that's what the position right now. But let's say I jog it to the home position that I want and I want that to be home. So what I can do is to go to the MC_set position.I set it to be 0. So I have to do it turn on this or execute this function now. So as soon as I do that, if I go back here, so it's now at zero. OK, so at this point I'm going to turn this back off. OK, so now let's talk about move relative. I already programmed the distance to be 4. 4 here means one revolution OK, and I'm setting up my velocity. Velocity at 100, acceleration at 100 as well as deceleration at 100. I'm going to execute my incremental move. OK, so now I just did 123456 78, so 8, right? Let's take a look at this. That's why it's 32. Make sense. All right, now at this point, let's say wherever I'm at, I want to tell this to go. I want to tell the motor to go back to 0, which is I can execute my absolute move and I'll tell as soon as I execute this, it will tell the motor to command the motor to go to 0. Watch this. OK, just move and let's take a look at this zero. OK. Now, if I want to execute and move, I'll tell the motor to go to 32. Actually, let me tell it to go to yeah, 32. All right, which is 8 revolutions. OK, here we go. Yep, it did that. And look at this. Bam, it's at 32. OK, so that's how you use the MC, basically the motion function blocks, the PLC open function blocks for motion and set it up. And so that's how you set up the Beijer CODESYS controller PLC XP-350 to interface with the Packer Drice. PD-04C drive to control the Packer servo motor using EtherCAT.
If you have any questions, please call (855) 737-4716 or fill out our online form.