To learn more: https://www.automationdirect.com/ls-electric-plc?utm_source=lDWSf4fv_0c&utm_medium=VideoTeamDescription
(VID-XG-0098)
LS XGB Help File Video: LP301-2
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
let's work with a function and a function Block in a latter program to add a function to our logic we select a valid location and press F10 in the name area we can type move and it brings up the many different types of move functions we can see that there are move functions for arrays bytes dents Etc we will select the general move function that works with any data type and click okay a new move function is added at the location we had highlighted and we can see that it has an En n and I in input as well as an En o and OU output if we put our cursor over the function it will show us the data type requirements for the en and Eno are Boolean let's use Boolean variables we have previously created and move the Boolean variable value of test 5 into test 6 we will use test 7 as the trigger for the function and test 8 as the function enable output when we added the function the software automatically added a lad Rong to the en input we can put a normally open contact on this Rong in front of this en input and select test 7 as the variable for the contact if we press escape to return to Arrow mode in the software we can double click to the right of Eno and select test 8 as the enable output of the function since we want to move test 5 into test 6 we can add those to the in and UT positions of the function if we download this to the CPU and place it into run mode and monitor mode we can set test five to true and test 6 remains false if we make test 7 true to enable the move function we see that the test five state has been moved into test 6 and test 8 became true indicating that the function was enabled if we make test 7 false we see test 8 go false as well we can then make test 5 false without influencing the state of test 6 as the move function is no longer enabled function blocks will act very similarly for our example let's add a TMR function block function blocks require an instance variable to be used let's name our instance test timer 1 when we select okay it will ask us to select a variable for the function block memory we don't currently have a timer variable so let's just use test timer 1 V when we hit okay again it will automatically prepare a TMR variable called test timer 1 V for us and if we select okay to create the variable it will be assigned to the test timer 1 function block instance if we then double click next to each input and output of the function block we can either select a pre-made variable of the correct data typee or we can create input and output variables for this function block let's create a normally open contact on the ion rung of the function block and list a local variable called test timer one enable since this variable does not exist the software will pre-populate the variable add window with the correct data type and information we can click okay and it will create the variable and assign it to the normally open contact we can perform the same workflow to create the other variables and we can see as we name a variable that doesn't currently exist exist the software automatically populates the variable ad window with the correct data type this is a great timesaver to prevent us from having to manually select the correct data type every time we want to create a new variable now that we have added the variables to the function block inputs and outputs let's download the project to the CPU and go into run and monitor modes we see the block is disabled and the preset is at zero currently if we double click on the preset it will allow us to enter a preset time we will select 5 seconds if we now make test timer 1 enable true we see that the timer starts timing and after 5 Seconds has elapsed the test timer 1 output variable becomes true indicating the timer has completed both functions and function blocks are easy to work with in xg5000 anytime we have any questions about what the purpose is for a specific function or function block the help files are always available to give us background information on any one of them
Voted #1 mid-sized employer in Atlanta
Check out our
job openings