HMI/VBA/Factorytalk

0938635

Member
Join Date
Jun 2016
Location
canada
Posts
2
Hi everyone,

I'm working in factorytalk with control logix PLC and I'm trying to make a confirmation on my start process button.

I put a VBA macro on my button, but I don't know how to set my plc tag to 1 (check the line in red in the following code)

Sub main()
If MsgBox("Do you want to start the system ?",
vbYesNo + vbQuestion + vbDefaultButton2, "Confirmation") = vbYes Then
'Here I want to set (momentary) my PLC tag to 1
Else
MsgBox "Start canceled", vbOKOnly + vbCritical +
vbSystemModal, "Start canceled"
End If

End Sub

Can someone help me ?
Thanks
 
Last edited:
Now that you say it, it's evident. I try it and it work fine, but i have another problem.

I create a display and i want to display it when my plc turn a tag to 1. I try to do it with event but it don't work. Maybe the solution is easy but i'm new to Factorytalk.

Am i right to do it with event or there's another way ?
 

Similar Topics

Hi, how can i use a defined Tag in HMI Tags (for exampele dintTag ) in VBA code by a display. i am using FactoryTalk SE thanx
Replies
1
Views
2,225
I'm working on some VBA code to place all available trend template names in a combo box from the user to select from. That way they can easily...
Replies
1
Views
6,877
Is this example really the easiest way to write to an HMI tag in VBA? I've been playing with this for a couple hours and so far this is the only...
Replies
4
Views
16,877
Hi, I am trying to create a list of tags with status, reference and description using Microsoft List view Control 6.0 and VB code behind the...
Replies
3
Views
5,192
I may be barking up the wrong tree here. I am using Factory Talk View ME 7.00.00 What I am trying to do is to design a standard look and feel...
Replies
4
Views
7,341
Back
Top Bottom