Daveyh
Member
I'm not sure the best way to ask this as there are probably dozens of ways to do this. Seems like it should be simple and something that's done all the time.
I'm using FactoryTalk View SE and I want to display data from an OPC server on a StringDisplay1. Easy, put the tag in the Expression box:
{Network.51.192.101.1815.RA.2310.Channel1.Value}
The hard part is that I want to be able to change which tag that StringDisplay1 gets its data from. There's another selector switch control that sets the active channel (1, 2, 3,..). Whatever active channel is selected is what data StringDisplay1 should display. Ideally there'd be a variable "ActiveChannel" and you could just put that in the tag name something like:
{Network.51.192.101.1815.RA.2310.Channel<ActiveChannel>.Value}
or maybe "{Network.51.192.101.1815.RA.2310.Channel" + ActiveChannel + ".Value}"
Or something like that. Haven't found a clue about if that's possible or what the syntax would be.
The other way I thought would be to use VBA to read the data from the OPC server and write it to a user tag or to the StringDisplay1 but I haven't been able to figure out how to read OPC data in VBA.
Thanks!
I'm using FactoryTalk View SE and I want to display data from an OPC server on a StringDisplay1. Easy, put the tag in the Expression box:
{Network.51.192.101.1815.RA.2310.Channel1.Value}
The hard part is that I want to be able to change which tag that StringDisplay1 gets its data from. There's another selector switch control that sets the active channel (1, 2, 3,..). Whatever active channel is selected is what data StringDisplay1 should display. Ideally there'd be a variable "ActiveChannel" and you could just put that in the tag name something like:
{Network.51.192.101.1815.RA.2310.Channel<ActiveChannel>.Value}
or maybe "{Network.51.192.101.1815.RA.2310.Channel" + ActiveChannel + ".Value}"
Or something like that. Haven't found a clue about if that's possible or what the syntax would be.
The other way I thought would be to use VBA to read the data from the OPC server and write it to a user tag or to the StringDisplay1 but I haven't been able to figure out how to read OPC data in VBA.
Thanks!
Last edited: