|
|
| Author |
Message |
hanss Newbie
Joined: 13 Oct 2006
Posts: 1
Location: Zurich
|
Posted: Fri Oct 13, 2006 1:06 pm Post subject: msaccess import |
|
|
I just purchased the TC08 and am trying to import temperature values into msaccess using vb. I have made a little progress, but am still having problems. I would appreciate any help! I am enclosing the zipped access file: thermal2.mdb with the examples.
Hanss
Zürich, Switzerland
Here is what I have (see enclosed thermal2.mdb):
Access Form name: form1
form1 has 3 text boxes (t1, t2, and t3) as well as the folllowing buttons and desired functions when clicked:
open (open TC-0
get (import temperature values from channels 1,2 and 3 into text boxes t1, t2, and t3)
close (close TC-0
This is vb that I have so far:
*******open button (this works!):
Private Sub open_Click()
Call usb_tc08_open_unit
End Sub
******* get button (only puts zeros into the text boxes):
Private Sub get_Click()
Dim ok As Integer
Dim tc08_handle As Integer
Dim temp_buffer(9) As Single
Dim overflow_flag As Integer
Call usb_tc08_set_mains(tc08_handle, True)
ok = usb_tc08_set_channel(tc08_handle, 0, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle, 1, Asc("K"))
ok = usb_tc08_set_channel(tc08_handle, 2, Asc("K"))
Call usb_tc08_get_single(tc08_handle, temp_buffer(0), overflow_flag, 0)
t1.Value = temp_buffer(0)
t2.Value = temp_buffer(1)
t3.Value = temp_buffer(2)
End Sub
********close (nothing happens):
Private Sub close_Click()
Call usb_tc08_close_unit(-1)
End Sub
| Description: |
|
 Download |
| Filename: |
thermal2.ZIP |
| Filesize: |
11.39 KB |
| Downloaded: |
217 Time(s) |
|
|
| Back to top |
|
 |
Michael Guru

Joined: 07 Jul 2005
Posts: 93
Location: St Neots, Cambridgeshire
|
Posted: Thu Nov 16, 2006 12:05 pm Post subject: |
|
|
Hello,
How are you getting on with this?
Please let me know.
Regards,
Michael
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|