AutomationDirect
Search
Login | Register
Accounts & Orders
Cart
0
$0.00

Recent Orders

View and Manage | Request Cancellation
Loading Order History
Loading...Loading...

Your Account

Account Home

Checkout   $0.00


  • My Orders
  • Product Returns (RMAs)
  • Pay Proforma Invoices
  • Pay Freights
  • Invoices / Invoice Reprint
  • Quotes / Favs / BOMs
  • Packing List Reprint
  • My Product Docs
  • Credit Application
  • Tax Exemption
| Direct Sales in US and Canada | 1-800-633-0405 | About Us | Contact Us | Line Card
Products | Support
| Compare
  
Ordering Tools  
warning Cookies are not enabled on your browser.
Cookies are required for our site. Please enable cookies in your browser preferences to continue.
+
Navigation
+
Shopping Categories
  • Barcode / RFID / Vision
  • Bulk Wire & Cable
  • Cables (Terminated)
  • Circuit Protection / Fuses / Disconnects
  • Communications
  • Drives & Soft Starters
  • Enclosure Thermal Management & Lights
  • Enclosures & Racks
  • Field I/O
  • HMI (Human Machine Interface)
  • Hydraulic Components
  • Motion Control
  • Motor Controls
  • Motors
  • Pneumatic Components
  • Power Products (Electrical)
  • Power Transmission (Mechanical)
  • Process Control & Measurement
  • Programmable Controllers
  • Pushbuttons / Switches / Indicators
  • Relays / Timers
  • Safety
  • Sensors / Encoders
  • Stacklights
  • Structural Frames / Rails
  • Tools & Test Equipment
  • Valves
  • Water (Potable) Components
  • Wiring Solutions
  • Retired Products
+
Learn More
  • Brand Line Card
  • What's New
  • E-newsletter
  • Online PDF Catalog
  • Video Tutorials
  • Company Reviews
  • Learning Library
  • Affordable Training
  • Free Online PLC training
  • Cybersecurity
+
In Depth Product Sites
  • Programmable Logic Controllers
  • Productivity1000 PLCs
  • Productivity2000 PLCs
  • Productivity3000 PLCs
  • ProductivityCODESYS
  • LS Electric XGB Series PLCs
  • ProductivityOpen
  • CLICK PLCs
  • Do-more H2 PLCs or
    Do-more T1H Series
  • Do-more BRX PLCs
  • C-more Touch Panels
  • AC & DC Drives
  • Motion Control Components
  • Servos
  • StrideLinx
  • Pneumatics
+
Product Selectors &
Configuration Utilities
  • PLC Family Selector
  • P1000 PLC Systems
  • P2000 PLC Systems
  • P3000 PLC Systems
  • ProductivityCODESYS
  • CLICK PLC Systems
  • Do-more® BRX PLC Systems
  • LS-Electric® XGB PLC Systems
  • Productivity®Open Systems
  • Datalogic® Safety Light Curtains
  • LS-Electric® Servo Systems
  • Nitra® Pneumatic Grippers
  • Object Detection (Sensors)
  • PAL Controller Configurator
  • Precision Gearbox Selector
  • Protos X® Field I/O
  • Quadritalia® Modular Enclosures
  • Stellar® Soft Starters
  • Stepper System Selector
  • SureFrame T-slot Extrusion
  • SureMotion® XYZ Gantry
  • SureServo2® System Selector
  • SureStep® Linear Actuators
  • Timing Belts & Pulleys
  • Werma® Stacklights
  • ZIPLinks

Adding a Function & Function Block to Logic - LS Electric XGB PLC from AutomationDirect



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


Hide Transcript
View Transcript

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



No data returned!
An error has occurred! Please contact support
Videos Home > Adding a Function & Function Block to Logic - LS Electric XGB PLC from AutomationDirect
Contact, Connect & More
Sign Up
to receive:
FREE e-Newsletter
sign up today!
Connect With Us
Social Media Channels:
linkedin    facebook    x    instagram    youtube
Company Information
About Us
Brand Line Card
System Integrator Program
International Sales
Panel Builder Program
Site Help
Company Reviews
Download Price List
Contact Us
Contact Options
1-800-633-0405
Monday - Friday
9 a.m. - 6 p.m. ET
excluding holidays
Career Opportunities
Voted #1 mid-sized employer in Atlanta
We're a great place to work!
Check out our job openings

Need Training?
Affordable Training by Interconnecting Automation
Free Online PLC Training
FREE Video Tutorials
Information & News
What's New / In The News
FREE e-Newsletter
Automation Notebook
Product Literature
White Papers
News, Product and Training Bulletins
E-Books
Shop with confidence
Checked   Safe & Secure
payment methods


We accept VISA, MasterCard, Discover, American Express, PayPal or company purchase orders.
AutomationDirect

BBB Accredited

Voted #1 mid-sized employer in Atlanta
Check out our job openings

Copyright © 1999-2025 AutomationDirect.  ALL RIGHTS RESERVED.
Site Map     Send Us your Feedback     Unsubscribe     Email Preferences     Legal & Business Policies     YouTube Terms of Service
Clear login credentials



Back to Top


spinner Updating...
Info