Visual Basic.NET

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

Visual Basic.NET

Post by Pete »

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

Style

Post by Style »

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?

Pete

Post by Pete »

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

Style

Post by Style »

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

Pete

Post by Pete »

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

Style

Post by Style »

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

Guest

Post by Guest »

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

Style

Post by Style »

Hi,

I have sent the codes to you~

with luck~

Horace

Guest

Post by Guest »

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

Pete

Post by Pete »

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

User avatar
matthew
Advanced User
Advanced User
Posts: 109
Joined: Wed Sep 25, 2002 9:35 am
Location: Cambridgeshire, UK

Post by matthew »

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

Post Reply