VBA Code Controlling PLC Tags in Studio 5000 Through FactoryTalk View Studio Site Edition
Using VBA code in FactoryTalk View Studio to control PLC tags in Studio 5000. This video is just an example of a best practice to get VBA to communicate to a PLC processor but is not limited to just this one example.
Treat this video as an eye-opener of many different applications that you could use this technique.
Private Sub VBACodeTrigger_Change()
On Error GoTo ErrorHandler
If Not IsError(VBACodeTrigger.Value) Then
If VBACodeTrigger.Value = 1 Then
ExecuteCommand "VBAmacro"
End If
End If
Exit Sub
ErrorHandler:
LogDiagnosticsMessage Err.Description, FTDiagSeverityError
End Sub
0:00 Example of VBA controlling PLC tags
1:00 HMI memory tag for VBA control
1:50 Adding a numeric display
2:25 Reason we change the name of the numeric display
2:50 Expose To VBA to VBA Control
3:40 Adding an HMI button
4:05 Using the &Set feature in button
5:05 Ladder Logic Seal In Circuit For Testing
7:11 Setting up FactoryTalk Linx shortcuts for HMI communications
7:59 Making a Macro in FactoryTalk View Studio
9:36 Opening VBA Code
10:25 Writing the VBA Code
14:46 Adding a second macro
16:45 Testing the VBA code
17:36 Creating an HMI Client for testing
19:05 VBA Code Testing through the HMI Client
20:30 Recommended videos for you
I hope it helped.
Thank you for watching the video.
Learn, Implement, Succeed
Visit:
https://www.allen-bradley-plc-training.com/
Other social media:
LinkedIn: https://www.linkedin.com/in/shane-welcher-sr/
Facebook: https://www.facebook.com/OnlinePLCSupport
#VBAcode #ExposeToVBA #VBAcontrol #FactoryTalk
-
15:26
Shane Welcher
1 year ago $0.01 earnedUnderstand VBA Code in FactoryTalk View Studio SE the Easy Way
46 -
16:16
Shane Welcher
2 years ago $0.04 earnedVBA Code for a Pop-Up Screen In FactoryTalk View Studio Site Edition
69 -
32:01
Microsoft Excel Full Course
3 years agoExcel 365 Visual Basic Part 29 – VB Editor
78 -
11:50
Microsoft Excel Full Course
3 years agoExcel 365 Visual Basic Part 27 – Running Macros
59 -
50:21
Microsoft Excel Full Course
3 years agoExcel 365 Visual Basic Part 26 – Macros
104 -
1:11:21
Microsoft Excel Full Course
3 years agoExcel 365 Visual Basic Part 37– Input Box
72 -
6:19
Pharos Technology
8 months agoEfficient Coding in VBA: Navigating the Code Window
16 -
25:15
Videos
11 months agoMastering Form Filling with VBA in MS Access | Automate Data Entry
771 -
24:45
Microsoft Excel Full Course
3 years agoExcel Visual Basic 365 Part 28 – Macro Examples
115 -
8:01
Microsoft Excel Full Course
3 years agoExcel 365 Visual Basic Part 41– Custom Programming Techniques
198