Test and Measurement Forum

Visual Basic.NET

Post general discussions on using our drivers to write your own software here

Visual Basic.NET

Postby Pete » Wed Jan 15, 2003 7:56 am

Hi,

Are the Pico DLL's supported when code is written using the lastest version of Visual Basic. IE: Visual Basic.NET?

Also does anybody have any experience with data capture using .NET? Good or bad.

And the lucky last. I would like to plot the captured data using voltage and time scales. This would include mouseover functionality for reading the x and y data points. Are there any examples of source code for this?

With thanks,

Pete
Pete
 

Postby Style » Wed Jan 15, 2003 11:09 pm

yes , it support VB.net! :)
Because im using it to develope my programme~
if you want to get an example of this,you may change the example that including in the software disk to VB6 format, and then VB.net format~

Indeed, im writting a software more or less same as you.
I'm also writing a programme to plot the data.
But i meet a problem that you may also need -- the trigger level!
The graph just more stable than i havent call settrigger function,but still unstable. And i never get the data with ETS mode...
I'm waiting for reply.Did you meet the problem same as me?
Style
 

Postby Pete » Thu Jan 16, 2003 9:41 pm

Hi,

I have only just started to write my code, so I haven't found any issues with the trigger as yet.

What I would really like is files that can be imported directly into .NET without any modifications from VB5, VB6 etc :D
This would be good to include in the latest CD also for download from this site. :idea: .NET seems to be the way of the future.

What are you using to chart your data in .NET?

Regards,

Pete
Pete
 

Postby Style » Fri Jan 17, 2003 12:08 am

Well, you can change the format by the coverter which included in VB6 or VB.net. The only job you need to do is open the file and covert it. 8)

I agree with you that the latest CD should be included VB.Net solution file~ :wink:

I'm writing a programme to find out the time difference between two peak in order to complete my job~And you?

Regrads,

Horace
Style
 

Postby Pete » Fri Jan 17, 2003 9:39 am

Hi,

Unfortunately I am using the poor mans version of .net (standard version) and it doesn't have the conversion from vb6 to .net :oops:

Is there any chance you could forward me a copy of the converted files :D My mailing address is get_jets@hotmail.com

My goal is to capture time synched data, plot it on an xy chart and then carry out some calculations on the data.

:shock: BTW Thanks for your posts.

Regards,

Pete
Pete
 

Postby Style » Fri Jan 17, 2003 11:22 am

well, it should be all the version has the converter. I think it is you dont know how to convert it, right?
mine is academic version, so should be equal to standard version~

If you want to convert a VB6 project file,
you just need to open the file(*.vbp), then the converter will be opened.
I can't send the sample code to you since i dont know which device you have. The codes vary from the devices.

I hope it can help you.

regards,
Horace
Style
 

Postby Guest » Fri Jan 17, 2003 1:53 pm

Hi,

I have tried it with no luck, the version I have doesn't support migration.
:(
I am using a ADC-42 if you could convert the files it would be really appreciated. :D

With thanks,

Pete
Guest
 

Postby Style » Sat Jan 18, 2003 12:24 am

Hi,

I have sent the codes to you~

with luck~

Horace
Style
 

Postby Guest » Sun Jan 19, 2003 11:45 pm

Hi,

Thanks for the code, most appreciated. :D
For others that are interested in visual basic.net please find below the code for ADC1032.dll declares for the ADC-42.

Cut and paste the code then save it as a module. :wink:


Code: Select all
Option Strict Off
Option Explicit On
Module Module1
    Declare Function adc10_get_driver_version Lib "adc1032.dll" () As Short
    Declare Function adc10_open_unit Lib "adc1032.dll" (ByVal port As Short, ByVal product As Short) As Short
    Declare Function adc10_set_unit Lib "adc1032.dll" (ByVal port As Short) As Short
    Declare Sub adc10_close_unit Lib "adc1032.dll" (ByVal port As Short)
    Declare Function adc10_get_unit_info Lib "adc1032.dll" (ByVal S As String, ByVal lth As Short, ByVal line_no As Short, ByVal port As Short) As Short
    Declare Function adc10_get_value Lib "adc1032.dll" () As Short
    Declare Function adc10_set_trigger Lib "adc1032.dll" (ByVal enabled As Short, ByVal enable_auto As Short, ByVal auto_ms As Short, ByVal dir_Renamed As Short, ByVal threshold As Short, ByVal delay As Short) As Short
    Declare Function adc10_set_interval Lib "adc1032.dll" (ByVal us_for_block As Integer, ByVal ideal_no_of_samples As Integer) As Integer
    Declare Function adc10_get_values Lib "adc1032.dll" (ByRef values As Short, ByVal no_of_values As Integer) As Integer
    Declare Function adc10_get_times_and_values Lib "adc1032.dll" (ByRef times As Integer, ByRef values As Short, ByVal no_of_values As Integer) As Integer
End Module


The text has wrapped in the post. All you need to do is make sure declare is the first word in the line where appropriate.

Cheers,

Pete
Guest
 

Postby Pete » Mon Jan 20, 2003 12:06 am

Hi,

One thing I should mention is that when the code was ported from VB5 to .net the following declare was changed. :roll:
Code: Select all
Declare Function adc10_set_trigger Lib "adc1032.dll" (ByVal enabled As Short, ByVal enable_auto As Short, ByVal auto_ms As Short, ByVal dir_Renamed As Short, ByVal threshold As Short, ByVal delay As Short) As Short

The value dir was changed to dir_Renamed
Does the dll need to be re-written to cater for this? :?:
Maybe Pico can shed some light on this one.

Cheers,

Pete
Pete
 

Postby matthew » Tue Jan 21, 2003 3:14 pm

Pete,

You emailed me and asked me to comment.

Although, I'm very interested in the discussions you are having here. We don't at present have the in-house expertise to support VB .net and I'm afraid I don't know the answer to your question. Perhaps we will move into this in the future :).

In the meantime, I wish you well in your discussions, and I hope that you will find the answers that you are looking for. I have no doubt, that the MSDN will have some of the answers.

Kind Regards,
Matt Everett

Pico Software Engineer
User avatar
matthew
Guru
Guru
 
Posts: 109
Joined: Wed Sep 25, 2002 9:35 am
Location: Cambridgeshire, UK


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests