To learn more: https://www.automationdirect.com/ls-electric-plc?utm_source=2i0aUnl3170&utm_medium=VideoTeamDescription
(VID-XG-0090)
LS XGB Help File Video: LP200-3
XG5000 V4.77 2024-06-28
To view the LS XGB Help File please visit: https://cdn.automationdirect.com/static/helpfiles/ls_plc/Content/Home.htm
**Please check our website for our most up-to-date product pricing and availability.
Related AutomationDirect.com Part Numbers: N/A
In our previous video, we setup the XGB PLC as an implicit scanner using the EDS file for the GS20 Variable Frequency Drive. In this video, we will be using the XG5000 Generic EDS file to manually configure an Implicit Scanner connection and message in the XG5000 software. This will also allow the EIPT module to communicate with and control our GS20 variable frequency drive. I have removed our original message, GS20 adapter, and input and output variable arrays from the project to allow us to start from scratch. To set up the PLC as an Implicit Scanner, we first must configure the EIPT module and the peer-to-peer connection. These are both covered in a separate video. It is important to note that the LS software and documentation may refer to the scanner as a client, and the adapter as a server. It is also important to note that data can move in two directions for EtherNet/IP. It can go from the scanner or “Originator” of the message to the adapter or “Target.” It can also go from the “Target” to the “Originator.” As such, Target to Originator or T2O data is called “Input” data since it provides incoming information to the controller, and Originator to Target or O2T data is called “Output” data since it provides outgoing information to the adapter. Since the required implicit message data size and location is specified in the adapter, the manufacturer of the adapter should provide the Input and Output Data size information as well as the instance location for that data. We can look in the GS20 documentation and see that it calls for a data type of 16 bits, or a 2-byte word, an input size of 16 words and an output size of 3 words. If we convert this to single byte instead of 2-byte word, it will be 32 bytes for the input and 6 bytes for the output. We also see that the input data is at Instance 101, the output data is at 100, and configuration data is at 102 with a size of 0. Let’s start by creating an input array, and output array in the PLC memory. We will use these two arrays as the first stop for all data from this EtherNet/IP connection once it is established. Let’s go to the project window on the left side of the screen and double-click on Global/Direct variables. This will open the “Global/Direct Variables” tab and we will insert two rows. If we select a type of “Array” and then click off of the selection, the software will open the “Select Array” pop-up window and we will set up a 1D array of 0 to 15 elements. This corresponds to 32 bytes of information. For 16-bit data size, the array type can be either “WORD” or “INT.” If we use “WORD” it will display the value in HEX by default, so let’s use INT to see it in decimal. We click “OK” and we will name this array “EIP_INPUT_ARRAY” and make it a Global variable. It is also important to make sure we check the box for EIP/OPC UA. This allows the PLC to use this array as part of our EIP transfer of information. Now we do the same for our output array. We will make it a 1D array of 0 to 2 elements and “INT” type. This will again correspond to 6 bytes of information. This one we will name “EIP_OUTPUT_ARRAY.” We will make it a global variable with a checkbox for EIP/OPC UA as well. We will now add a generic EDS file to the project. If we maximize our EIPT card and then the P2P 03 connection we created in the video on configuring the EIPT module, we can double-click on “EIP Settings” to open the “LSPLC – EIP Settings 03” tab. Here we can drag and drop the generic EDS file that comes included with the XG5000 software. Doing this opens the “EDS channel” pop-up window and here we can set the channel number and IP address of the drive we are connecting to. In our case, the drive resides at 192.168.27.105. The channel number is used by the software to determine which device we are targeting when we set up our communication blocks in the next step. The system will automatically increment the channel number for each additional device added, and it will not allow duplicate channel numbering. We will leave this at 0. Now that we have added the channel to the connection, we are ready to configure our message. If we go back to the EIPT card and then our P2P 03 connection, we can double-click on “EIP Block,” and the software opens the “LSPLC-EIP 03” tab. The channel for this message is 0 since we set up our adapter the same as when we used the GS20 EDS file. This time however, we have several options for “I/O type” that weren’t there when we imported the GS20 EDS. This is because the generic EDS file doesn’t specify the message types available the way that the GS20 EDS file did. Since we want to control the drive, not just monitor it, and the instance locations are below 255, we will be doing “Exclusive Owner (8-bit instance).” We will use point-to-point still, and when we select “parameter” we will now have to set the T2O & O2T data sizes, config instance and output/input assembly instances based on the adapter device documentation we looked up earlier. We will set the input message to be size 32 bytes and the output message to be size 6 bytes. The input instance is 101, the output instance is 100, and the config instance is 102. The RPI will depend on the application and how fast of a drive response we need. If our RPI is too fast, the network will have problems keeping up. If it is too slow, the system will not respond to our commands as quickly as we want. We can leave our RPI at the default of 100ms for this application. Once we have completed our parameters, we can then set our timeout and add the arrays we created to the input and output lines of the message. Let’s write this to the PLC. Once complete we will have to reset the PLC as we have made changes to the communications settings. We can then reconnect and go into monitor mode. If we refer to the GS20 manual again we see that our input array, element 3 will tell us our drive output frequency. In our output array, element 0 bit 1 will put the drive into run mode, and bit 0 will put it back into stop mode. Element 1 will allow us to set a target frequency. Let’s add these three elements to our Monitor window. We see that currently our actual frequency is 0, our target frequency is 0, and our command data word is also 0. Since the command word is actually a bitmap, let’s right click on that line and select “represent in binary.” This will show the status of each bit in the 16-bit word. Let’s set our target frequency to 6000, as this corresponds to 60 hertz. Let’s turn on bit 1, the second bit of the command word and sure enough, we see the frequency feedback increasing as the drive accelerates. And there it stopped at 60. Let’s change our frequency command to 40 hertz… and the drive went down to 40, and now let’s turn off bit 1, and turn on bit 0 of the command word to put the drive back into stop mode…. And the drive executes a deceleration back down to 0 hertz. Perfect! We have now configured an Implicit EtherNet/IP connection with the PLC acting as the scanner by manually setting up a message. We can now control our GS20 VFD from the PLC!
Voted #1 mid-sized employer in Atlanta
Check out our
job openings