Momentary Button in VB Script in RSView32?

imloggedin

Member
Join Date
Dec 2007
Location
Missouri
Posts
81
Is their a function to send a momentary output to a tag? For writing analogs for example I use this...
Dim SP As Tag
Set SP = gTagDb.GetTag("SP\SETPOINT_SP")
SP.Value = TextBox1.Text
What about digitals though? I need to have a button on a VB form and send a momentary output.

Thanks.
 
Just set the value directly to true (or false, 1 or 0) in RSView, then in the target device (assuming a PLC here) reset it to the default state after you've processed it.

Otherwise, you have to start playing with setting up timers and such, which is probably not a good idea.
 
Could you elaborate as to why you feel it is necessary to this rather than to use the standard features already available in RSView. When you enter an analog value (such as a setpoint) in RSView it is written once to the referenced tag in the PLC. With digitals you can set, reset, toggle, etc. Why would you need to write a VB script?
 
Im not sure what your asking but i already have a form made in VBA, im adding additional features to this form. RSTrendX would only work correctly in VBA not in RSView32 so thats what i did instead of fighting with it. Now i need to make a button to toggle a digital.
 
RSView 32 - Write to digital tag

Try this for the vba command you are looking for;

gCommand.Execute ("Set Tagname 1")

Of course your need to change Tagname to the name in your application tag database. If this does not work let me know and I will see if I can give you further help.
 

Similar Topics

How do I write a complex script for a momentary button press? The reference manual says sleep() isn't recommended for button presses. I am...
Replies
5
Views
3,680
Hello everyone, Does anybody know if there is a way of simulating the behaviour of a FTV momentary push button on iFix? I am trying to create a...
Replies
5
Views
1,767
Hi All Could anyone advise me on how to protect the push button on the screen from occasional touch? I've faced up the problem that I can't...
Replies
22
Views
6,515
For reasons, I find myself having to disable buttons using SE controls rather than in the PLC (massive project, no time to edit PLC properly). I...
Replies
0
Views
1,017
I have a Window with few Pushbuttons set as Direct. There's no problem using mouse clicking. But on touch screen monitor, the button behavior is...
Replies
7
Views
2,888
Back
Top Bottom