sample excel macro provided with PicoLog

 
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
Author Message
Guest






PostPosted: Wed Jul 21, 2004 10:45 am    Post subject: sample excel macro provided with PicoLog Reply with quote

I notice that the PicoLog software comes complete with a separate macro for reading data straight into Microsoft Excel. I would like to utilise this feature but using type J thermocouples instead of K.

I looked in the visual basic code and would be obliged if you could confirm the following

"Call tc08_set_channel(Port, 1, Asc("K"), 10, 0, 0)"

Presumably changing the K to a J would enable a type J thermocouple to be used?

"If ok Then
Cells(i + 3, "C").value = temperature / 100"

This is the equation for reading the temperature into excel. Does this equation change for a type J thermocouple?

To read from more than two channels could the following code be used?

"Call tc08_set_channel(Port, 3, Asc("J"), 10, 0, 0)"
"If ok Then
Cells(i + 3, "D").value = temperature / 100"

or is the maximin number of channels usable with your macro only two?
Back to top
markspencer
Site Admin
Site Admin


Joined: 07 May 2003
Posts: 610

PostPosted: Thu Jul 22, 2004 8:25 am    Post subject: Reply with quote

Hi,

Thank you for your post.

It is possible to use all 8 channels in the excel macro by calling the tc08_set_channel routine. You are correct in your assumption that changing the 'K' to a 'J' will indeed inform the driver that the thermocouple that you intend using on this channel wil be a J type thermocoupl. You do not have to have all the same thermocouples on the channels eg channel 1 may use a J type, and channel 2 a K type etc.


You asked about the following code this will place the data after the variable temperature has been divided by 100 in to row i+3, and column C. To get the reading into temperature variable you will need to us the routine tc08_get_temp.

Best regards,

If ok Then
Cells(i + 3, "C").value = temperature / 100"
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group