Tc-08 setting with VBA

Post your VB and VBA discussions here
Post Reply
ahs_89
Newbie
Posts: 0
Joined: Mon Mar 13, 2017 11:32 am

Tc-08 setting with VBA

Post by ahs_89 »

Hello

I am a beginner with macros and also with the pico tc-08.

I am using this instrument to measure the temperature and I need that the data is recorded.
I modified the default macro to copy paste every value and record it.

The problem is that I am not sure if the settings are good for the thermocouple I am using.

I need to configure the channel 1 at type T and channel 2 at type K.

In the macro there is this line that I tried to modify:

Code: Select all

Call usb_tc08_set_mains(tc08_handle, True)
      ok = usb_tc08_set_channel(tc08_handle, 0, Asc("T"))
      ok = usb_tc08_set_channel(tc08_handle, 1, Asc("T"))
      ok = usb_tc08_set_channel(tc08_handle, 2, Asc("K"))
      ok = usb_tc08_set_channel(tc08_handle, 3, Asc("mV"))
      Call Timer1_Timer
I am not sure that the value is processed as type T or K because when I try to change the channel to measure mV it give my a constant value of "65535".

So I needed some help to find the correct setting.

Thanks in advance

Ahsan

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Tc-08 setting with VBA

Post by Martyn »

For Channel 1 as T type and Channel 2 as K type you only need

Code: Select all

ok = usb_tc08_set_channel(tc08_handle, 1, Asc("T"))
ok = usb_tc08_set_channel(tc08_handle, 2, Asc("K"))
the cold junction will be enabled automatically.
X is the character to use for voltage readings.
Martyn
Technical Support Manager

ahs_89
Newbie
Posts: 0
Joined: Mon Mar 13, 2017 11:32 am

Re: Tc-08 setting with VBA

Post by ahs_89 »

Thanks for your answer.

With the cold junction record I need the make any compensation with the value from channels 1-3 or they readings that I am receiving from them are ok?

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Tc-08 setting with VBA

Post by Martyn »

When you enable a channel with a thermocouple, cold junction compensation is applied automatically.
Martyn
Technical Support Manager

Post Reply