Date And Time In Studio 5000
In this post, we will see how to configure date and time between Studio 5000 and FactoryTalk View Studio.
Showing date and time in a graphics display like HMI or SCADA is always necessary for programmers. This is because virtually no operator can accept the system if he is not able to see the current date and time in his display. It helps in keeping in touch with all the real time data like alarms, trends, reports and audit trail. But, apart from just showing date and time on graphics, there are many applications where a programmer is required to get date and time in a PLC program and use it for some logic. There are various ways through which PLC date and time is updated in corresponding automation software. One such brand that we will see is Rockwell Automation. And in this, we will see two of the most used software - Studio 5000 for PLC and FactoryTalk View Studio for HMI / SCADA. It is very easy to update date and time in PLC software through a shortcut by reading it directly from HMI software. In this post, we will see how to communicate date and time between Studio 5000 and FactoryTalk View Studio.
How to read date and time from FactoryTalk View Studio to Studio 5000?
- Create six tags in Studio 5000 - Day, Month, Year, Hours, Minutes and Seconds. These tags will then be used by you to get all date and time data and use it for programming further in PLC. Define their data types as DINT.
- Now, first let us start with FactoryTalk View Studio - Machine Edition. This software is used for HMI purposes. First, create a date and time object on a screen for verification. Refer to the below images for understanding. In the first image, I have taken a date and time display on screen by going to objects - advanced - time and date. This will show you the current time and date in runtime. In the second image, you have to double-click global connections which will open a popup window. In that, you have to assign your six PLC tags that you had created in PLC software as shown. Keep both the time settings - date and time output interval and maximum update rate to 1 second. So, what does this do? Basically, it will update the system date and time of HMI into the PLC tags that you have assigned in every 1 second. So, when you simulate both the software, you can see real time data in your PLC tags online.
- Next, we will see FactoryTalk View Studio - Site Edition. This software is used for SCADA purposes. First, create a date and time object on a screen for verification. It is the same way that we did earlier with the same step. This will show you the current time and date in runtime. Now, refer to the below image. Here, you have to go to the option - derived tags and right-click it to create a new tag. This will open a window where you have to configure it as shown below. As you can see, there are two columns to work - derived tag name and expression. Expression is the tag which will write it’s value to the derived tag name. So, from the image, we have assigned a system tag in the expression field and the PLC tag in the derived tag name. When done, save this tag created as - SCADA_CLock. It can be named as per your convenience.
- Now that you have assigned tags, you have to tell the SCADA software as to how frequently to update it. This is shown below. Right-click the project name as shown and click properties. A popup window will open where you have to tick derived tags and assign the tag that you created in the earlier step. Then, click the run startup components option. Press Ok, and once you run this program, your date and time tags in PLC will get automatically updated continuously with the SCADA date and time.
I have covered a commonly used technique in reading date and time from FactoryTalk View Studio to Studio 5000. I have also not attempted to cover all the methods, as it can vary from programmer to programmer. Once you are familiar with this programming, you can easily tackle all types of problems in it.
Thank you for reading the post. I hope you liked it and
will find a new way in this type of technology.
its very useful content ..
ReplyDelete