FactoryTalk View SE VBA Tags to Excel

Hi,
I would like to refresh the topic.
One of my customers wants to log some data to excel.
I read the hole topic but I still have some questions:
1. To log data I need to write VB macro. Where it should be written? In macros section? Or I should write some VB code which I can assign to each element on SCADA screen?
2. I need to write data values lets say once per day. Can I create every time new file or can I write values in new cells? Can I use variable from PLC to chenge excel cell number?
3. Is it posible to execute VB macro on trigger from PLC?
Thanks in advance for any help.
 
What is the platforms i.e. PLC Scada i.e Clx, Factorytalk without that information it is guesswork.
Personally, if you have some form of scada I would log the data to SQL or other database, then should you wish to port the data into Excel create a macro enabled spreadsheet template, on that place button that displays a date picker, the user could then select a date, that does an SQL query, loads the data into the spreadsheet, this way you have a robust logging system i.e. SQL, an excel template that can be distributed to users it also means if you import the data onto a second sheet, use some VBA to copy & format it onto the front sheet to produce a good looking report. if you are not that good with VBA & SQL you can create a macro that imports the data & save it, goto VBA, open the macro, modifiy the query string so as to replace the date/time in the macro to the date picker & run the macro. I did this many years ago, the template was distributed to those in production (protected so it could not be changed) all they had to do is open the template, pick the date & accept it, imported the data into sheet 2, some VBA then copied the data onto a formatted sheet 1 & placed it into a report, it also meant that this sheet had charts to give a really good looking report. There are many ways but this seemed the simplest at the time, Excel has moved on & perhaps better ways to do it or simpler to log the data to CSV files, however, you will still need to format it to produce a report. I have done this on RSV32, Ifix etc.
 

Similar Topics

I'm creating an HMI that has a recipe with 288 data point. It has 3 pieces of data for 96 segments. I need help with VBA code to copy all 288...
Replies
0
Views
144
Hi, Can someone guide me through how to use FactoryTalk SE VB script to open communication with SQL Server? which command I can use? Are there...
Replies
2
Views
2,306
Hello group, I have been migrating a project from RSView 32 V7.6 to FactoryTalk View SE Local Station V12 over the last couple of days. All told...
Replies
0
Views
1,000
For trend charts, I can use an ActiveX Calendar control to select a date on a trend using the following code where "Trend" is the name of the...
Replies
2
Views
1,585
Anyone know how to change the mouse icon to something else using VBA? It looks like it can be done with VBA forms and based on the object the...
Replies
0
Views
2,220
Back
Top Bottom