6 posts in this topic

Hey guys,

 

I am looking to query a database through FactoryTalk SE.  I will be scanning packages, and using that bar code to find a lane assignment from the database.  

 

My question has to do with where the VB script will reside in the FactoryTalke SE program.  I want this script to run at all times.  I see that each screen has a "VBA Code" but I am assuming that these will only run when the screen is visible.

 

Where does this have to be stored in order to run all the time?

 

Thanks In Advance!

Share this post


Link to post
Share on other sites
On ‎11‎/‎27‎/‎2017 at 10:45 AM, JBird1229 said:

Where does this have to be stored in order to run all the time?

I don't think you can do this. I think in RSView32, the VBA resides separately from any specific screen. But in FTView SE, I think VBA code can only reside in a specific screen or button.

Share this post


Link to post
Share on other sites

AndrewG, thanks for the insight! 

 

I'm guessing I would need write a separate VB application to run behind the scenes while FTViewSE is running and doing its thing.  What do you think?

Share this post


Link to post
Share on other sites
4 hours ago, JBird1229 said:

 

I'm guessing I would need write a separate VB application to run behind the scenes while FTViewSE is running and doing its thing.  What do you think?

Yes it could work. You would need to write a standalone VB application. At one of my old jobs, this was how we did it: CompactLogix PLC, FTView SE HMI, VB .exe application. The PLC communicated with the HMI, and the HMI communicated with the VB application. There was some "heartbeat" logic to make sure that communication was not lost. Not sure of the details because I never worked on the VB application personally.

Share this post


Link to post
Share on other sites

In SE VBA can only run on a client and not on a server and is attached to a specific display object. We handle this by running a "hidden" display behind the main background on one of our clients. Each VBA sub is triggered by an object on this display. For instance the object could be a numerical display with the VBA triggered on any change or an expression can be entered causing the VBA to be triggered at a specific time interval. It is clunky but it works OK and is reliable. We did this to accommodate quite a lot of old VBA code when we migrated from RSView32 to Factory Talk View SE.

1 person likes this

Share this post


Link to post
Share on other sites

Thanks!  I think that both ideas are good.

 

We are planning to write a standalone VB application for our instance.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now