Determining a buttons up or down state in VBA

Hi
I don't use RS View.... but why not use Lancie1 method in the PLC to toggle on a bit, and use the bits tag state change event to run your script?

On Event Bit Value Changed

If bit=True then
Run Script x
Else
Run Script y
EndIf

A clumsy work around but would probably work
 
It would work (kind of, the is a pressed even but no on change event) but the problem is I need the tag from the button object. If I have to program the tag into the VB script, that would double to triple the programming time and double the upkeep now that the tag is in two places. We've all had fun trying to keep two identical documents the same. That doesn't work. So I'm sure a few months from now, the tag in the object will change and the programmer won't know they need to edit the VB as well and then all heck you break loose.
 

Similar Topics

We are in the process of installing a new DC drive to replace a 1373 series Speedpak drive. There are 8 leads coming out of the motor -- Two for...
Replies
5
Views
857
Good morning! I am looking for a clever method to determine the number of occurrences in a series using ladder logic. What I need to determine is...
Replies
6
Views
1,267
I have my PLC and HMI connected to my local network over DHCP just like my laptop. I can upload and download including VNC to the HMI over wifi...
Replies
2
Views
1,144
We have a DC Drive (ABB DCS800) which is running a load (initially) at a fixed speed. For testing purposes, we want to simulate a different...
Replies
20
Views
6,326
ive been tasked, due to a restructure of our inventory, to find out how big our SLC programs are. specifically, we have several dozen 5/05s at...
Replies
4
Views
1,736
Back
Top Bottom