FTView SE PLC to trigger a script

KolbLena

Member
Join Date
Jan 2014
Location
Illinois
Posts
8
I'm hoping that this a simple problem that I just don't see.
Most of my background is with GE Cimplicity.

I'm running FTView SE 6.0 on a Windows XP SCADA computer with RSLogix5000 on the PLC.

I have a script that will generate data from the PLC and output it to a .csv. The script works fine when I tie it to a button.
I've also tested it so it will run when a when a screen opens.

The problem is I need to have the screen open when a bit turns true in the PLC so the script will execute.

I've put the bit in the alarm and event setup and put a message to display in the banner. The message displays when the bit triggers. But I can't seem to get the FactoryTalk View Command on that alarm to display the screen with the script.

I've also tried using a macro. The macro opens the screen when I tie it to a button, but again I cannot get the macro to run when the alarm triggers thru the alarm setup.

Should I be trying to do this thru the event monitor?
 
you should just be able to run your script from the 'logic and control' Events.
Create an event, monitor the tag in the expression for true, trigger your script in the action.
I routinely do this based off of a time of day in the events.
 
Thanks Gracefull -
Tried that - in the logic and control folder events I created an event with the action Display test_vba (the screen name that will execute the script)
The expression is {[PLC]Write_Report}=1
(also tried {[PLC]Write_Report}= true)
It's enabled. The syntax is valid. It's saved.
And it still will not execute.
It must be an undocumented feature I'm missing in FactoryTalk.
 
Is your event server running? try starting the event server in from the command line,
EventOn "your event name"
if that works you can start the event server from a macro or the component startup in your application.
 
Is your event server running? try starting the event server in from the command line,
EventOn "your event name"
if that works you can start the event server from a macro or the component startup in your application.

Good advice.

Thanks Gracefull -
Tried that - in the logic and control folder events I created an event with the action Display test_vba (the screen name that will execute the script)
The expression is {[PLC]Write_Report}=1
(also tried {[PLC]Write_Report}= true)
It's enabled. The syntax is valid. It's saved.
And it still will not execute.
It must be an undocumented feature I'm missing in FactoryTalk.

You can also use just "[PLC]Write_Report" if it's a bool or bit, but be sure to keep it "on" twice as long as the update rate of your Event file. So if you set your Event file to update every second, keep your bit on for 2 seconds.

Another option I've used is it to open a display on project starup (typically using a macro) which comes up positioned off the visible screen. Then on this display I place an object linked to the PLC tag in question, and when it changes state I use that "event" to trigger my VBA code.

Hope this helps!
 
Thanks everyone:
Graceful: There is an eventon in the startup macro and it is running, but the screen still fails to load.
Wildeto: I'll give it a try
Shawn: thanks - this is not my project - something I inherited. The bit was on a 5 second timer - I'll change it to a latch and unlatch.
 
Good News/Bad News. Trigger is now on a latched bit with the expression of {[PLC]WriteReport}. Rebooted computer. The event detector is now working but:

Event Detector: Issuing Command "Display test_vba"
Display test_vba
The command Display is ignored when issued from the development environment or an HMI server.
🔨
 
Good News/Bad News. Trigger is now on a latched bit with the expression of {[PLC]WriteReport}. Rebooted computer. The event detector is now working but:

Event Detector: Issuing Command "Display test_vba"
Display test_vba
The command Display is ignored when issued from the development environment or an HMI server.
🔨

My workaround is create a hidden display that is alway open but behind everything.
Put a numeric display tied to the trigger bit and place the commands in the numericdisplay???.change vba code.

Private Sub NumericDisplay1_Change()
If NumericDisplay1.Value = 1 Then
Application.ExecuteCommand ("display popup")

Else
Application.ExecuteCommand ("Abort popup")

End If

End Sub
 
Thanks everyone!

What I ended up doing was deleting the event, alarm, macro etc.
that I had been trying to do.

I then created a screen called alarm_trigger, set it's screen properties to cache, always refreshed (because all the other screens are set up as replace) and added display alarm_trigger as the first screen to load in the startup macro.

I then put a numeric display in the screen alarm_trigger connected to the writereport bit in the PLC.

I then put my VB script into the numericdisplay_change()sub in the alarm_trigger screen.

Saved and rebooted everything.

I conditioned the writereport bit in the PLC with a latch bit and a timer to unlatch after 30 seconds.

It's worked three times in a row - I'm declaring victory - it's time for a drink!
🍺
 
Unfortunately as you found you ran into the dreaded client/server architecture with FT SE. The event server is server based. The write to a CSV or display a window are client based. You cannot do client based actions in the event server like you used to could do in RSView32. Baldone correctly pointed you in the right direction. At least 25% of AB's tech notes on FT SE cover these stupid work arounds.
 
Unfortunately as you found you ran into the dreaded client/server architecture with FT SE. The event server is server based. The write to a CSV or display a window are client based. You cannot do client based actions in the event server like you used to could do in RSView32. Baldone correctly pointed you in the right direction. At least 25% of AB's tech notes on FT SE cover these stupid work arounds.

Sucks that I have to jump through so many hoops to do things I can do natively with Indusoft.

Lack of client dedicated variables is another PIA.
 
I honestly don't know what keeps FT SE afloat. It is the biggest POS for HMI, exceedingly buggy and featureless, requires endless workarounds, OCX additions, registry hacks, reboots and routinely just stops working. It's been that way since 5.0 and 7.0 is no better and more bloat, IMO. It's got to the point that I add a surcharge to any job where a customer requires it. I can only guess that because it has Rockwell stamped on the box, that customer's continue to buy it, because there are sooo many better options out there. It's almost gotten to the point that NO HMI is better than FT SE.
 
Man I hear you.

No native numeric entry popup that is even remotely functional.
No ability to filter Alarms by date in Factory Talk Alarm and Events.
No abiility to group alarms in seperate folders in Factory Talk Alarm and Events.
Making a functional Server with multiple clients requires a ridiculous amount workarounds.

Getting domain based security to work means hours of screwing around to get things to behave like you wish based on login credentials.

Only good thing is I have gotten good enough at working around the limitations that I will probably have work for the next decade.
 
Well, I feel so much better about not figuring out how to make the darn thing do what I wanted quickly. In Cimplicity it was easy. Apparently not so much in FT land.
Thanks again for everyone's help and ideas.
 

Similar Topics

I have a FTView ME project and i want to be able to logout the current user based on a PLC Trigger (keyswitch). How can i implement this? Is...
Replies
8
Views
2,843
Hi All, we've recently upgraded from FTView SE v10 to v12. Since the upgrade we've been having a problem where the HMI is slow to update tags in...
Replies
0
Views
49
I have searched and most of the threads with this information are very old and none give a good example. basically i have ftview se running on a...
Replies
0
Views
972
I have searched and most of the threads with this information are very old and none give a good example. basically i have ftview se running on a...
Replies
1
Views
1,102
Hi, I'm trying to display a popup in FTview when a PLC tag reaches 0. Then you have to hit a confirm button to close the popup. I should probably...
Replies
2
Views
1,374
Back
Top Bottom