Author Topic: Tags Studio 5000  (Read 1020 times)

AlexOrtega

  • Newbie
  • *
  • Posts: 2
    • View Profile
Tags Studio 5000
« on: November 01, 2020, 09:29:51 PM »
Hi, im new with VB code just trying to figure out a way to change the logic value from a TAG(just to visualize), for instance

I have a tag named "Start" so whenever this tag is 1 (True ) in the plc program i want this tag to be false in my HMI SimpleLed indicator (i tried to change the ON/OFF color state of the LED but it looks weird because i dont want to do this to all my tags)
The main reason for all of this is because i have normally close contacts in my plc prgram that i'd like to visualize in the hmi and its not working like i want

I'd like to do this in the visual basic software i dont want to modify the plc program.

Can u help me please! Thank u beforehand

MajorFault

  • Guest
Re: Tags Studio 5000
« Reply #1 on: November 01, 2020, 09:52:07 PM »
Unless I'm reading wrong, there is no expressions allowed, but you can almost always use NOT prior to the tag name.  That should do what you want.   Or, straighten it out in the PLC first!!

AlexOrtega

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Tags Studio 5000
« Reply #2 on: November 01, 2020, 11:11:42 PM »
Yes I think with a NOT instruction will solve my problem, excuse me Sir do you have an example, how to do that? I'm very new with VB
I'm using the ethernet ip driver for compact logix so I just use the tag name to visualize the state of the led but how do you implement a NOT logic in VB with a led ?

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Tags Studio 5000
« Reply #3 on: November 02, 2020, 12:05:26 AM »
It should be as simple as putting "NOT Start" in the PLCAddressValue property.