Test and Measurement Forum

TC-08 Datalogging in Excel

Post your VB and VBA discussions here

TC-08 Datalogging in Excel

Postby ATemple » Tue Dec 04, 2012 4:39 pm

Hi,

I have a working program which was using an Agilent tech data logger, but it is being "acquired" by some others within the department for a big set of test and I am trying to adapt my program to use the TC-08 instead.

I have downloaded the sample macro and have been using that as an input point and then trying to read from there every second or so to a new sheet (so the new sheet has a column with the temperatures measured every second, rather than a single updating cell). Which is similar to what we had with the old datalogger. However when I try to run it I get an overflow error. Any help would be much appreciated.

Cheers
Alastair

P.S. This is my first time for quite a few years using VBA and as a result I'm incredibly scratchy and probably making some simple error in there somewhere.
ATemple
Newbie
 
Posts: 0
Joined: Tue Dec 04, 2012 4:33 pm

Re: TC-08 Datalogging in Excel

Postby Martyn » Wed Dec 05, 2012 7:35 am

Does the excel macro we supply run without any modification, updating a single cell ?

If it does then you just need to add in a loop variable i to increment for each set of readings

Code: Select all
       Cells(i+4, "A").value = temp_buffer(0)
       Cells(i+4, "B").value = temp_buffer(1)
       Cells(i+4, "C").value = temp_buffer(2)
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2339
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: TC-08 Datalogging in Excel

Postby ATemple » Wed Jan 09, 2013 12:46 pm

Sorry about the late reply, got caught up in exams and then the holdiays. Yes it does currently work by itself. It is when I try to integrate it with the rest of the program that I come into problems.

I'll try adding the buffer to the sample by itself first and see what happens.
ATemple
Newbie
 
Posts: 0
Joined: Tue Dec 04, 2012 4:33 pm

Re: TC-08 Datalogging in Excel

Postby mortenx » Wed Jan 15, 2014 10:58 am

How can i log that every new sample is in next row?

Code: Select all
       Cells(i+4, "A").value = temp_buffer(0)
       Cells(i+4, "B").value = temp_buffer(1)
       Cells(i+4, "C").value = temp_buffer(2)

does not do that:(

and how can i use multiple tc-08?
mortenx
Newbie
 
Posts: 0
Joined: Wed Nov 06, 2013 11:45 am

Re: TC-08 Datalogging in Excel

Postby Martyn » Thu Jan 16, 2014 11:56 am

To use multiple TC-08's you will need to open the units and write the code with two or more active handles.

To log data you use
Code: Select all
       Cells(row_number, column_number).value = temp_buffer(0)

So to log in the next row keep column the same and increment the row
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2339
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


Return to VB and VBA (Excel, Access)

Who is online

Users browsing this forum: No registered users and 1 guest