Help for iFix 5.0 reporting

manasi

Member
Join Date
May 2007
Location
maharashtra
Posts
123
Dear all,
I am using licensed iFix 5.0 but not proficy historian. So to generate simple reports in MS Excel ( Date, Time, Tag name , TAg value). Do anybody has vb code for it. I am not much familier with vb.

PLC : Compact Logix L31
Communication protocol : DF1
HMI communication with PLC is through local OPC server.

Regards
Manasi
 
Create an excel file with file name 'Shift' in C:\ , & close the file.

After placing the script in a button in you should a refference "microsoft exel 11.0 object library".

then, goto run mode & click the button & chect your excle sheet.
script should run when excel sheet is opened.





Dim n As String
Dim tagname,
tagname = READVALUE("MASS_FLOW.F_CV", 2) ‘mass flow is tagname in a database.

On Error Resume Next

Set xlapp = CreateObject("excel.application")
Set xlwbk = xlapp.Workbooks.Open("C:\Shift.xls", xl, yes)
Set xlsht = xlwbk.Worksheets(1)
'Make excel object visible
xlapp.Parent.Visible = False


'Write the values in cells
xlsht.Cells(3, 1) = Format(Time, "HH:MM")
xlsht.Cells(2, 2) = tagname


'save xl workbook
xlwbk.Save


'close the excel workbook
xlwbk.Close
'close all object
Set xlsht = Nothing
Set xlwbk = Nothing
 

Similar Topics

Hi! I am using ifix first time and looking backup scada to learn things. For Datalink I am using following tag reference and it is working fine...
Replies
7
Views
2,372
Hello, I am working with a system previously developed on a logix500 based slc controller, a new rendition has been made using a compactlogix...
Replies
0
Views
2,301
Hi all,, Can anyone help me in installing the scada ifix software... I have 5 sets of CDs.. is there any one by one methodology in installing...
Replies
2
Views
2,563
I have generated a CSV import file for my database but whenever I try to import, the DB editor just crashes. Is there a way to troubleshoot what...
Replies
2
Views
3,530
Hello. Urge you to help you tell me the code VBA in Ifix 3.5. Specifically, like this: I want to update the operating time of equipment, every 24...
Replies
1
Views
3,925
Back
Top Bottom