Problem with Data logging Citect and Excel

A

Thread Starter

Anonymous

Hi Everybody,

I Reeeeaaaallly need you help please.

What i need to do is this, i'm working in citect with a simple program, monitoring 4 digital variables, monitoring if they are on or off, i read the data from an adam 4050 conected via an adam4520 to the computer everything works fine, but what i have to do is to register every 10 min. for example the state of each one of the digital inputs and record it in Excel.

I've worked with this: "=Citect|Data!Motor_primario" in excel and i can see the state of each one of the entries with no problem, but it doesn't save any data it just shows in real time the state of the entries. When i made a trend of the entries and push the save button and saves it like an *.xls i have the excel file i need but i have to push the save button, it doesn´t work automatically.

I've read the citect manual and i guess the csv list (working with the macro ddeformu.xls) is what i need but it doesn't work.

So this is what i've done so far: ive tried to make a Visual Basic program, it works but everytime i save a data in excel i "lose" some seconds, so in an hour i end losing like 2 or 3 min. Its really a program, cause i need to monitor at least a day.

So i'm guessing the solution is working with cicode (maybe trnexportdbf), but i'm kinda new with citect and i can't do it. It doesn't matter if the solution is with Excel or maybe with a Database like an Access file.

Please HElP!!! i'm desperate, if you wish i can send you my visual basic program.
If you can help me and need some information my mail is [email protected]

Please, i really would appreciate if you can help me.
 
Using Excel, the easiest thing to do is setup a VBA macro/code to log and move the data within the spreadsheet. You can setup the main program and open and save your data under a different file name.

Depending on the format you want you can also setup Cicode / report to save your data. You will need to setup extra variables, etc.

If your weak with VBA there are several good books about using VBA with Excel.
 
What I would do is to use the sql functions in Cicode and log the data to an Access database.

This should be easy to do, as these function are well defined.

I would then set up an excel spreadsheet, using VBA to display the selected data.

Another alternate...
Write a vb application which can be called in cicode that parses the data, spreadsheet name and cell position. This could be an exe with input arguments.

The vb application can then open the spreadsheet and save the data to the desired cell.

In fact the application could just run in the system tray at the bottom of the screen. This can easly be done.
 
E

Engelbert Rodríguez

I did something close similar with Visual Basic in WinCC. If you want write to me directly and I´ll send you te code (If you still want to do it in VB).

Regards

Engelbert Rodríguez
[email protected]
ICESA
Spain
 
Top