Search found 20 matches

by steveastrouk
Tue Apr 22, 2014 11:36 am
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

Would that have come from a "picotech" URL Martyn, because I have nothing, even in my spam folder
Steve
by steveastrouk
Tue Apr 15, 2014 1:31 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

Thanks a lot Martyn.
I can't see it though. Could you resend to steve@ravenfield.com ?
by steveastrouk
Sun Apr 13, 2014 8:42 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

Unfortunately we do not provide source code for our drivers. Can you try Microsoft VS C++ Express Edition with the example code I provided to check that it works correctly ? I've downloaded it, but I hadn't realised how alien it was compared to Delphi. I really don't want to have to learn an entire...
by steveastrouk
Fri Apr 04, 2014 7:52 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

Martyn wrote:One of the parts you will need to look closely at is 32bit addresses versus 64bit, so you need to make sure you are using the correct parts for the application you are building.
I'm getting nowhere Martyn, is there any chance I can see the DLL code ?
by steveastrouk
Mon Mar 24, 2014 7:37 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

Martyn wrote:Possibly

Code: Select all

temp_buffer  : array [0..9] of real;
This problem seems to be hanging on exactly how many bytes are in which datatype passed to the DLL - changing to real made no difference. Did that C example actually run on real hardware ?
by steveastrouk
Fri Mar 21, 2014 9:42 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

Can you post your code again so that we can see what it looks like now. Thanks. This is the current INC file function usb_tc08_get_temp( handle : smallint; temp_buffer : Pinteger; times_ms_buffer : Pinteger; buffer_length : smallint; var overflow : smallint; channel : smallint; units : smallint; fi...
by steveastrouk
Wed Mar 19, 2014 9:47 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

You will need to be passing the address of the first element of the temp_buffer and times_ms_buffer arrays, not the actual values in these arrays. If it is not possible to use the array itself, with some referencing, then you could create a pointer value, which you set to the address of the first e...
by steveastrouk
Tue Mar 18, 2014 7:17 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

I am using Win 7 Pro 32 bit. If you are compiling 32 bit application against 32 bit drivers you should be Ok, so I would look carefully at what Delphi does with respect to pointers for arrays of Reals, and try a few things out. This looks like the canonical method of addressing the DLL function usb...
by steveastrouk
Tue Mar 18, 2014 6:46 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

I am using Win 7 Pro 32 bit. If you are compiling 32 bit application against 32 bit drivers you should be Ok, so I would look carefully at what Delphi does with respect to pointers for arrays of Reals, and try a few things out. That's the sort of area I'm looking at now. If I give the function the ...
by steveastrouk
Tue Mar 18, 2014 11:32 am
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

Martyn wrote:Are you building your code for 64bit in Delphi ?

If so are you using the 64bit dll from the x64 folder, and the 64bit kernel driver from system\amd64 folder of the SDK ?
No, but the Windows 7 install is Win7 Pro, so that's 64bit
by steveastrouk
Mon Mar 17, 2014 10:02 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

I can't check until tomorrow, but the header file in the SDK would be a good starting point. VB.Net, C#, LabVIEW, VBA, Matlab all have their difficulties, complicated even further when you throw in 64 bit. NOW this IS a 64Bit system... Is the header file for the 64 bit version identical to the 32 b...
by steveastrouk
Mon Mar 17, 2014 6:07 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

Martyn wrote:4 bytes in the float as I am on 32bit

if you are using & it would be &temp_buffer[0] ie the address of the first float in the array, but the compiler knows what to do with temp_buffer
God this is hard work.
What does the C++ prototype function look like for the DLL ?
by steveastrouk
Mon Mar 17, 2014 2:42 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

int main(void) { short hTemp; int i; float temp_buffer[100]; long times_ms_buffer[100]; short buffer_length = 100; short overflow; hTemp = usb_tc08_open_unit(); usb_tc08_set_channel (hTemp, 1, 'K'); usb_tc08_run(hTemp, 100); Sleep(1000); usb_tc08_get_temp(hTemp, temp_buffer, times_ms_buffer, buffer...
by steveastrouk
Sun Mar 16, 2014 9:55 am
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

No, that causes the same error.

Steve
by steveastrouk
Sat Mar 15, 2014 7:39 pm
Forum: General Software Discussions
Topic: TC08 invoking usb_tc08_get_temp sample code
Replies: 38
Views: 25661

Re: TC08 invoking usb_tc08_get_temp sample code

Tried that thusly: And it crashes on the call to get_temp Debugger Exception Notification --------------------------- Project Quench.exe raised exception class EAccessViolation with message 'Access violation at address 5C7454E2 in module 'usbtc08.dll'. Write of address 00000009'. The code is now as ...