Dear all,
how can I identify two Picologs connected to the same computer? I must distinguish the handlers of two instruments. I'm using Visual Basic .NET.
P.S. I'm using the Picolog access functions listed in the attached file, but I'm not able to run the pl1000GetUnitInfo correctly.
Would it be possible to send in a snippet of code showing how you open the two units and then call the pl1000GetUnitInfo function please?
What is being returned for the string and requiredSize parameters from the call to the function?
Have you predefined the String S as a blank string e.g. S = " ". Also, referring to the Programmer's guide, in section 3.3.4, there is a line that states 'If you want to find out the length of the string before allocating a buffer for it, then call the function with string = NULL first.'
Any information on what is being returned as the PICO_STATUS value for each call to that function would be helpful.
Public PicoLog1216_1 As Short
Public PicoLog1216_2 As Short
pl1000OpenUnit(PicoLog1216_1)
pl1000OpenUnit(PicoLog1216_2)
The real problem is that I'm not able to use pl1000GetUnitInfo function. It returns me unreadable information. Probably the function is uncorrectly definited... I'm using it in this way:
Dim requiredSize As Short = 0, size As Short = 20, infos As Short = 0
Dim info As String = "........................."
pl1000GetUnitInfo(PicoLog1216_1, info, size, requiredSize, infos)
I need some help using (and corrently defining) pl1000GetUnitInfo function.
Dim status As Short
Dim handle As Short
Dim handle2 As Short
Dim status2 As Short
Dim S As String
status = pl1000OpenUnit(handle)
status2 = pl1000OpenUnit(handle2)
S = " "
status = pl1000GetUnitInfo(handle, S, 255, requiredSize, 3)
Console.WriteLine("Variant: " & S)
status2 = pl1000GetUnitInfo(handle2, S, 255, requiredSize, 3)
Console.WriteLine("Variant: " & S)
pl1000GetUnitInfo Lib "pl1000.dll" (ByVal handle As Short, ByVal S As String, ByVal lth As Short, ByRef requiredSize As Short, ByVal info As Short) As Integer
Please check if there is sometingh other else wrong.
Is there a list of all picolog function correctly definied for Visual Basic .NET using?
Declare Function pl1000OpenUnit Lib "pl1000.dll" (ByRef handle As Integer) As Long
Declare Function pl1000CloseUnit Lib "pl1000.dll" (ByVal handle As Integer) As Long
Declare Function pl1000GetUnitInfo Lib "pl1000.dll" (ByVal handle As Integer, ByVal S As String, ByVal lth As Integer, ByRef requiredSize As Integer, ByVal info As Integer) As Integer
Declare Function pl1000SetTrigger Lib "pl1000.dll" (ByVal handle As Integer, ByVal enabled As Integer, ByVal enable_auto As Integer, ByVal auto_ms As Integer, ByVal channel As Integer, ByVal dir As Integer, ByVal threshold As Integer, ByVal hysterisis As Integer, ByVal delay As Single) As Integer
Declare Function pl1000SetInterval Lib "pl1000.dll" (ByVal handle As Integer, ByRef us_for_block As Long, ByVal ideal_no_of_samples As Long, channels As Integer, ByVal No_of_channels As Integer) As Long
Declare Function pl1000GetValues Lib "pl1000.dll" (ByVal handle As Integer, ByRef values As Integer, ByRef no_of_values As Long, ByRef overflow As Integer, ByRef triggerIndex As Long) As Long
Declare Function pl1000Run Lib "pl1000.dll" (ByVal handle As Integer, ByVal no_of_values As Long, ByVal method As Integer) As Integer
Declare Function pl1000Ready Lib "pl1000.dll" (ByVal handle As Integer, ByRef ready As Integer) As Long
Declare Function pl1000MaxValue Lib "pl1000.dll" (ByVal handle As Integer, ByRef maxValue As Integer) As Long