DIY hardware interface for simple data collection and robot control?

For issues with communication ports, protocols, etc.
fridlund
Posts: 24
Joined: Jun 03, 2007 15:24
Location: Southern California

Re: DIY hardware interface for simple data collection and robot control?

Postby fridlund » Nov 27, 2019 1:10

Hi again MrSwiss,
Once again I started to tackle the U3_HV and I am stuck right at the beginning! When I try to load the DLL for the U3 as follows, FB freezes before even going to the console screen:

Dim LJ_lib As Any Ptr

# Ifdef __FB_64BIT__
LJ_lib = DylibLoad("C:\Windows\System32\LabJackUD.dll") ' FBC 64
# Else
LJ_lib = DylibLoad("C:\Windows\SysWOW64\LabJackUD.dll") ' FBC 32
# EndIf
If LJ_lib = 0 Then
Print "ERROR: 'LabJackUD.dll' load failed!"
Beep : Sleep : End 1
End If

When i try : #inclib "LabJackUD.dll" instead I get a "not found" err msg even when supplying all different dirs containing the DLL.

Do you have any idea what could be going on? I reinstalled all U3 software, and the PureBasic and VB examples for the U3 work, so ...
I'm hoping this will be trivial for you, since you're doing me yet another favor here.
I posted this on the LJ forum too in case it's their problem.
Thanks again,
Alan
fxm
Posts: 9316
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: DIY hardware interface for simple data collection and robot control?

Postby fxm » Nov 27, 2019 5:51

#inclib "filename"
or
result = DyLibLoad ( filename )

In both cases, do not specify the extension (.dll) in the filename string.

[edit]
But for DLL, it should also work by specifying the extension (.dll).
Do not specify extension (.a) and prefix (lib) is required only for static libraries.
Last edited by fxm on Nov 27, 2019 9:07, edited 3 times in total.
fridlund
Posts: 24
Joined: Jun 03, 2007 15:24
Location: Southern California

Re: DIY hardware interface for simple data collection and robot control?

Postby fridlund » Nov 27, 2019 7:09

OMG, so simple. That got me past the major hurdle. You know how something can be on the grocery-store shelf and you just can't find it?

I'm always that guy.

Thanks so much,
Alan

Return to “Hardware Interfaces / Communication”

Who is online

Users browsing this forum: No registered users and 1 guest