Test and Measurement Forum

Tc-08 setting with VBA

Post your VB and VBA discussions here

Tc-08 setting with VBA

Postby ahs_89 » Mon Mar 13, 2017 11:45 am

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
ahs_89
Newbie
 
Posts: 0
Joined: Mon Mar 13, 2017 11:32 am

Re: Tc-08 setting with VBA

Postby Martyn » Tue Mar 14, 2017 1:13 pm

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2585
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Tc-08 setting with VBA

Postby ahs_89 » Fri Mar 17, 2017 11:52 am

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?
ahs_89
Newbie
 
Posts: 0
Joined: Mon Mar 13, 2017 11:32 am

Re: Tc-08 setting with VBA

Postby Martyn » Fri Mar 17, 2017 12:02 pm

When you enable a channel with a thermocouple, cold junction compensation is applied automatically.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2585
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 0 guests