Sie sind auf Seite 1von 1

Automating Home and Industry…

Home Christian Resources ControlLogix SLC500 FactoryTalk View Motion Control Theory

Sensors Arduino Virtual Private Servers About Me Search …

Home » ControlLogix » GSV with a UDT

Search …
GSV with a UDT
Search
January 15, 2020  in ControlLogix  tagged GSV / UDT by Ricky

 Recent Posts
› FactoryTalk View ME with
RSEmulate
Introduction to GSV with a UDT
› FactoryTalk Visibility Animation Today we’ll discuss how to structure a tag to hold the system clock using the command GSV with a UDT (User De ned Data Type).
› Navigating Linux
We use the GSV (Get System Value) command to pull data from the system, and copy that data to a tag. This allows us to use system data
› MCR Zones in our ladder logic. In this example, we will copy the system time into a tag that is structured with a UDT. As a result, we will have tags
› Rebooting a VPS available such as Time.Year, Time.Month, Time.Day, etc.

In contrast, if we copy the data to a standard array, our tags would be Time[0] for the year, Time[1], for the month, etc. Therefore, by
 Archives incorporating a UDT, we have more user friendly tags.

› June 2020
› March 2020
Structuring the UDT
› February 2020 First, we’ll create a UDT that has 7 elements. To do this, right click the “User De ned” folder under “Data Types” to create a new Data Type. A
› January 2020 Data Type is simply the way data is structured within a tag. Basically, we are adding a new “Menu Item” to our Data Types.

› December 2019

› November 2019
› October 2019
› September 2019
› April 2019
› March 2019
› December 2018
› November 2018
› October 2018 Structure your data Type as follows. First, name your Data Type. In this example, we’ll name our data type “DateTime”. Secondly, add the
› September 2018 seven members as follows. Be sure the data types of each member are all DINT’s. Finally, hit “Apply” and “OK”.

› July 2018
› May 2018
› March 2018
› November 2017
› October 2017
› September 2017
› July 2017
› June 2017
› May 2017
› April 2017
› March 2017
› February 2017
› December 2016

 Categories
› Advanced
› Arduino and other microprocessors
Create the Tag
› Beginner
› ControlLogix Meanwhile, I’ll go to “Controller Tags” . Controller tags are Global. This will give the ability for any program to access your system time. Under
Edit tags, I’ll add a new tag called “Time” with the “DateTime” Data Type. This is the Data Structure that we just created.
› Creation
› Experiments After we hit the enter key, we will expand the “Time” Tag, to verify the sub elements are laid out as we like.
› EZPLC
› FactoryTalk View ME
› Information Technology
› Intermediate
› Motion
› PLC-5
› SLC500

In effect this gives us Time.Year, Time.Month, Time.Day, Time.Hour, Time.Minute, Time.Second, and Time.Microsecond.

Add the GSV Command


Finally, add the GSV Command to our logic. Since the system time might be used by all logic, I’ll just add it to the Main Routine. Add a GSV
Command. The class will be “WallClockTime”. Likewise, the attribute will be “LocalDateTime” to account for the time zone. Notice there is no
selection for the Instance. In reality, there can be no other present time than “right now”. There is no other instance. Store the result to
Time.Year.

Now that we have the GSV in place, I will nalize my edits and go to “Controller Tags”. When in Run mode, you will see the time similar to
what is shown below. Your tags will update every processor scan.

Please feel free to post any questions you have on creating the GSV with a UDT! Now that your system time is in a tag, you can use this for
time stamps, generating reports at certain times, or even a blow a horn for lunch break!

For information on other features, visit the ControlLogix Category Page!

— Ricky Bryce

 Leave a comment
Your email address will not be published. Required elds are marked *

Comment

Name *

Email *

Website

Math Captcha

seventy nine + = 88

No soy un robot
reCAPTCHA
Privacidad - Condiciones

Post Comment

Post navigation
← PLC-5 Remote I/O Adapter 1785-KE Module →

  · © 2020 Bryce Automation · Designed with Customizr Pro ·

Das könnte Ihnen auch gefallen