FTS HMI how to trigger open and close displays

Join Date
Oct 2015
Location
Beaumont
Posts
28
ok, i'm having trouble trying to figure out how to get my factory talk studio to open and close displays based on plc bits. Example: When a bit goes true (1), close and or open another display. I tried using an Event but it says " the command "abort" is ignored when issued from the development environment or an HMI server". What am I missing? Keep in mind I'm an amateur programmer lol.


Thanks
Thomas
 
First up, I'm assuming you're using FTView SE, not ME? Your terminology would suggest so, but it never hurts to be sure.

Second, that message says it all. When you're in the development environment (i.e. FTView Studio) testing displays, "abort", "display" and most other commands to do with changing displays are ignored. You'll have to run the full-blown application to see if it works or not.

Third, I don't think it's possible to use events to change displays in FTView SE. If it does work, I'm very interested to learn it - but I spent a long time a while back painstakingly making it work in VBA because as far as I could tell, it wasn't possible in SE. Here's a thread on the subject.
 
I initially thought to try and type this out, but decided to maybe just capture the screen. A picture is worth a thousand words, so they say. Basically the bit has to set an integer within a file, and that integer file then controls the screen when set to do so within FTV.

FTV HMI.JPG HMI Set.jpg
 
I initially thought to try and type this out, but decided to maybe just capture the screen. A picture is worth a thousand words, so they say. Basically the bit has to set an integer within a file, and that integer file then controls the screen when set to do so within FTV.

This only applies to FTView ME. The OP hasn't confirmed which version they're using yet - and if they are using ME then the screenshots attached are on the money - but if it's SE, it's a whole different ballgame.
 
i have done a small project, in which i have displayed a screen (an annunciation screen) when a bit in the program is high, this screen will not replace the base screen instead it will be displayed over the base screen.

For that i need to write some vb script. if this is your requirement, pls tell, i will share that code with you.

Reg,
Ashish
 
ok, maybe someone could give me an example. I'm not really comprehending this VBA code. What I'm looking to do is:
User presses start sequence
this launches the first display (already done this)
after the sequence ends, close that display and open another

any ideas?

thanks,
Thomas
 
If you're new to VBA, start simple. First, just get something to happen based on an event. If you read my first post in the thread I linked, you'll see that created a test display with a button, a numeric display, and some text. The button toggles the TestBool tag (which is a tag not tied to the PLC, just a local HMI tag for testing). The numeric display showed the state of the TestBool tag. When I go to test display, clicking the button makes the numeric display change from 1 to 0 and back again, so I know the tag is changing. Then, in the VBA, whenever my tag changes, I increment 1 to a variable and set the text to display the current count. So every time I click the button, the number shown in the text box should increment.

Here's the code I was working with - start with this, and see if you can get this much to work (I don't know if this is complete or not). Then work up from there a bit at a time: next you can try using a PLC tag instead of a HMI tag to trigger your "count up". Then, instead of counting up, you can try to call a display.

Code:
Public WithEvents TestTags As TagGroup
TagGroup.Active = True
TagGroup.RefreshFromSource = True

Public Sub Display_AnimationStart()
Dim TestLogicInt As Integer
If TestTags Is Nothing Then
Set TestTags = Application.CreateTagGroup(Me.AreaName, 1000)
TestTags.Add "{Utilities\TestBool}"
End If

TestTags.Item("{Utilities\TestBool}").Value = False
Elements.Item("text1").Caption = TestLogicInt

End Sub

Private Sub TestTags_Change(ByVal TagNames As IGOMStringList)
TestLogicInt = TestLogicInt + 1
Elements.Item("text1").Caption = TestLogicInt
Application.ShowDisplay ("popup")
End Sub
 
ok, i'm having trouble trying to figure out how to get my factory talk studio to open and close displays based on plc bits. Example: When a bit goes true (1), close and or open another display. I tried using an Event but it says " the command "abort" is ignored when issued from the development environment or an HMI server". What am I missing? Keep in mind I'm an amateur programmer lol.


Thanks
Thomas

You will definitely have to use VBA.
Start with the code sample from ASF.


In FTView SE, some things run on the HMI server and some on the client.
Events run on the server and display changes run on the client.
VBA also runs on the client.

So, you cannot use Events (server) to make display changes (client). In the same way, you cannot use VBA (client) to run code for the whole project (server). VBA code only runs on an open display in the client.


Maybe that doesn't make sense now, but once you get the server & client side sorted out it should help reduce the frustration.
 
I see this is from 2016 but thought I would add to it anyway, I stumbled across it so someone else will.


The message you are getting appears when you are trying to run a command that cannot be done from the development environment. If you place a button on the screen and set its command to "Abort" in order to close the display you will see the same error message in the diagnostics list.



Build a client file and try the button or VBA code using ExecuteCommand("Abort")
 
This post is from a while ago, but does anyone have a clear response to this? I'm currently stuck on the same thing but can't seem to figure it out.

Thanks
 

Similar Topics

So at my plant our shift schedule is 12 hour shifts 7 days a week. There is 4 shifts A,B,C,D. A and C are the day shifts. 6am to 6pm B and D are...
Replies
10
Views
3,942
Guys, Good morning I'm drawing a blank here. I have a Studio5000 and i'm writing a program one of the Turck I/O blocks I am reading from is a...
Replies
5
Views
2,180
Morning All, Has anyone else experienced this where when drawing lines between blocks or deleting lines and pasting blocks the view randomly...
Replies
1
Views
2,567
It's not directly PLC related but it is probably a problem that some forum members have solved in the past. The issue I have is that we are...
Replies
6
Views
3,336
Hello, This will be a very easy answer for most here. I have a simple rung of code in RSLOGIX 5000 V16.04 to count an event everytime it happens...
Replies
3
Views
1,884
Back
Top Bottom