LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a simple way in LabVIEW to collect data from two connected USB devices (force plates)?

I am a long time user of LabVIEW and am familiar with data acquisition processes involving DAQMx and more basic "Acquire Waveform" (from A/D cards). Now, I've been hired on to write a program which will collect data from two sensors (force plates) which will be connected to the computer via USB (this was a new development).

 

Unfortunately, I have never acquired data directly from a USB port. So, sorry if this is a simple question, but is there a built-in LabVIEW vi that is designed to collect digital input via USB directly? I will not have access to these devices until I'm actually onsite. 

 

I am using the most recent version of LabVIEW.

 

Once I have the data I'm good to go. Just a bit nervous about the DAQ part. Would appreciate any help you can offer - Thanks!

 

Peter

0 Kudos
Message 1 of 17
(4,113 Views)

Do you know anything about these sensors - manufacturer, model number, etc?  It would be very unusual to acquire data directly from the USB port, although in a worst-case situation you might need to do that if all you have is details of the communication.  More likely the sensor provides a simulated serial interface over USB, in which case it's easy to use the VISA functions to read from and write to the serial port.  It's also possible that the manufacturer provides a DLL for communicating with their sensor, in which case you'll need the documentation for it to find out how easy it will be to integrate it with LabVIEW.

0 Kudos
Message 2 of 17
(4,111 Views)

Hi - Thanks for the response.

 

I do know a bit about it. The force plates are from a company called Bertec and they offer a software SDK thatis described by:

 

"Bertec provides third-party developers access to our Device DLL which facilitates communication to our series of force plates. This Device DLL can be used by a wide variety of development environments. The SDK includes documentation, sample code, and bindings for .NET, Java, and C-level functions."

 

In this file includes DLLs

 

Unfortunately, I'm a biomechanist by training - not really a programmer. I've gotten by in the past with my ability to handle A/D DAQ and analysis, but am afraid I've run into something I'm not entirely prepared to deal with. Other information is here: http://bertec.com/downloads.html

 

0 Kudos
Message 3 of 17
(4,103 Views)

I'd say you're in luck.  This looks like a simple interface with a small number of functions and clear documentation, you should not have too much trouble.  I recommend using the .NET interface.  Unpack the SDK.  Drop a "Constructor Node" from the .NET palette on your block diagram.  Browse to BertecDeviceNET.dll and select BertecDevice.  You can then add and wire property and method nodes (again, from the .NET palette) to get access to the documented functions.  Use the polling function for now; don't worry about events until you have a better understanding of LabVIEW and .NET.  Try it out, and if you have questions about your code, upload your VI along with an explanation of the problem or error you're seeing.

0 Kudos
Message 4 of 17
(4,096 Views)

I just found this thread and wanted to try it out. I have LabView 2012 Sp1 64-bit. I just downloaded and unpacked the Bertec SDK, dropped a Constructor Node on my block diagram, and browsed to BertecDeviceNET.dll (4.0.1.27291). But then under Objects it says "An error occurred trying to load the assembly." Doesn't seem I can go anywhere from here. Am I doing something wrong, or do I need to contact Bertec to ask them if something is wrong with their DLL?

 

Thanks for any info!

0 Kudos
Message 5 of 17
(3,913 Views)

Is the dll a 64 bit version? If it is 32 bit, I do not think it will work.

 

-AK2DM

 

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 17
(3,907 Views)

I just found out from Bertec that their DLL is 32-bit. Does anyone know if there is a way to run 32-bit DLL's in LabView 2012 64-bit? Or do I have to get the 32-bit version of LabView 2012?

0 Kudos
Message 7 of 17
(3,897 Views)

Actually, I can answer this now based on other threads. The answer is that I needed to get the 32-bit version of Labview because that was easier than creating a 64-bit wrapper.

0 Kudos
Message 8 of 17
(3,890 Views)

I am trying to follow your suggestion, nathand, but I have run into a snag. The polling function in this .NET DLL takes two pointer arguments: an int32* and a double[]. I have seen in various places how to pass a pointer into a C/C++ function using the Call Library Function VI, but I do not see any way to do this in .NET.

 

Is there any way to reference an int32 in LabView to pass into my .NET method and to dereference it after the method has finished?

0 Kudos
Message 9 of 17
(3,881 Views)

@ajpodge wrote:

I am trying to follow your suggestion, nathand, but I have run into a snag. The polling function in this .NET DLL takes two pointer arguments: an int32* and a double[]. I have seen in various places how to pass a pointer into a C/C++ function using the Call Library Function VI, but I do not see any way to do this in .NET.

 

Is there any way to reference an int32 in LabView to pass into my .NET method and to dereference it after the method has finished?


Did you try dropping a method node for this function on your block diagram? If you do, you'll see that LabVIEW handles it for you by providing both an input and an output for that parameter.

0 Kudos
Message 10 of 17
(3,874 Views)