Optix as a Headless Data Gateway

Home / FactoryTalk Optix / Optix for Edge

Description
TThis video demonstrates how to use a “Changed Event” in FactoryTalk Optix to pass data from one PLC to another PLC when running as a headless application.

To save bandwidth, controller tag values update at runtime only when FactoryTalk Optix Applications display the tag values. If running “headless” this presents a problem to reading and writing to PLC tags.


Transcript
(00:01) so this video I just want to demonstrate a something that came about as a bit of a question around using Factor talk Optics as a headless data Gateway and in general if you’re going to pass data say from like a PLC tag to like an mqtt um tag or to an OPC UA tag then um it’ll run headless without any kind of additional steps but um what was kind of discovered was that if you were trying to pass data from one com driver station to a different com driver station U such as from one PLC to another PLC or perhaps from a mod bus device which is a you
(00:48) know takes a you know is a com driver station to a PLC or vice versa if you’re were going to run headless then then there was a little bit of a catch so um just to kind of demonstrate this I have two plc’s running both of them virtually right now I’ve got the micro 800 running and the simulator and I just have two tags created here um micro 800 tag zero and tag one and then I have a Logix application also running and it’s running in my Logix Echo emulator and it just has two tags um logic tag zero Logics tag one and the premise of this
(01:33) is that I want to take this um this I’m going to punch in a value in my plug-in module here is an analog input and I want to write this value to the control Logics but I want to do it when the Optics application is going to run headless meaning there’s going to be no um no screen or no native display um happening so in Optics side um I am going to show it first how it how it works um if it was with a with a display such as a native presentation engine here and again um I’ve already kind of set some things up here I’ve got a com
(02:15) driver I have my my micro 850 driver um already loaded and basically just those two tags have been imported tag zero tag one and I’ve also brought in my logic’s C CPU and also two tags the Logics tag zero logixs tag one and what I’m doing is for Logix tag zero I am basically just moving uh micro 100 tag zero I’m just putting it into logic’s tag zero so all I’m doing is taking this value and and making a dynamic link to this logic tag zero so that whatever this tag is equal to this logic tag it will be equal to
(03:01) it’s all I’m doing so um so I have a I I have a a quick little display that’s that shows the numbers um and that’s key to this kind of demonstration here so I’m going to start up the emulator and I’m also going to close the uh Optics screen down for a second and the emulator is over here so what what’s happening is is we can see that right now the plug-in value is zero and I have it um I have a scale block running in the micro 800 so it’s just going to scale between a number um between 0 and 500 um being that it’s
(03:41) minus 125 you know the the starting point for this scale is going to be like 13,17 um for 4 milliamps uh right now it’s basically acting like it’s zero milliamps so um but essentially minus 125 here and minus 125 here here if I go ahead and just type in a different number let’s just say something like 25,000 that changes the scaled value to 113 and instantly populated 113 in the logic controller and the reason why this is working is because I am using these tags on this display screen so one thing about Optics is is that it’s only going
(04:25) to update the com driver tags if there are tags on scan or tags on the display so if I go to headless mode we will find out that this is not going to work so if I come back to Optics Studio I’m going to just delete the native presentation engine I’m just going to delete this all together so now there will be no display that pops up um so we don’t have to have a native presentation engine or the web Pres presentation engine we can just run this completely headless if I go ahead and run the emulator now we will find that it is
(05:11) running but there’s no display of course to see now if I were to change this value to like 10,000 or something we do see we get a scaled value of minus 29 here but my Logics tag did not update so again the emulator is currently running and again there’s just nothing to to visualize because there’s no native presentation engine so I’m going to go ahead and stop the emulator so the solution to this um there’s a couple ways to do it one you can run some net logic script that’ll kind of synchronize tags um but another way to do that is is
(05:54) I can um I can go to the tag property here and I can basically come over here to the properties and I can choose this add new and I’m going to do a changed event and that’ll put U this event down here micro 800 tag zero change the vent and then um what we’ll do is we’re going to say that it’s going to be a command a variable command and we’re going to set a variable value so now we have a a variable to modify and the value itself so for the uh variable to modify I’m going to basically take my logic’s tag zero and
(06:49) put that there and then for the value I’m going to make it equal to micro 100 tag Z and that’s all there is to do now back on my Logics tag zero I did have this set to this so I am U I’m going to go ahead and clear this out I had that set previously in the uh in the prior example but going back to micro Hunter tag zero we can see that um uh basically we’re going to modify logic tag zero and make it equal to micro tag zero so we are still headless we don’t have a native presentation engine I’m going to go ahead and start the
(07:37) emulator so the emulator is running now we can see that instantly we get – 29 – 29 so before this was not updating at all so if I go ahead and change this uh to say 35,000 uh we get 208 in here we get 208 in the micro 800 so they are basically synchronized again and it’s working as a headless unit headless um version of Optics acting as a Gateway so one one example for this would be you know if we need to pass data um you know from one PLC to another in this manner perhaps again we’re reading a modbus device and want to pass
(08:19) that modbus data to another PLC um we can also you know I’m I’m showing Rockwell to Rockwell and and um you know this may or may not be you know particular use case um in this situation but if we had a seaman controller and we want to pass data to the um um you know to the to the control Logics or to the micro 800 or one of the other um PLC drivers that Optics supports we can treat Optics as a bit of a Gateway device here and and again run completely headless without the need to build any HMI screens um so quick little demonstration
(08:58) I wanted to show this hopefully it might help um anyone who uh is faced with this situation