LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing labview driver

Solved!
Go to solution

Hello all, I have an USB 4 relay board, K138402BSJH 1982-USB4Ch. It doesn't come with any Labview drivers that I can use. It is and FTDI chip. I should be able to access the low level functions of this board but do not know where to start with Labview on this. Not sure I'm even asking the question correctly. Where do I start with something like this. Just point me in the right direction please. I will do the research but do not even know where to start.

0 Kudos
Message 1 of 9
(5,046 Views)

A quick search found this web page

 

It is in C#. You can access the assembly from LabVIEW.

 

Good luck.

Marc Dubois
0 Kudos
Message 2 of 9
(5,037 Views)
Solution
Accepted by HoneyBadger1957

Other info here.

According to the added review, you need to use FT2DXX.DLL. Driver and documentation on the ftdichip.com site.

Functions in the dll can be invoked through the Call Library Function node (Libraries & Executables palette).

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 9
(5,021 Views)

Thank you. I will now learn to use that function. That's what I was  missing. I will study up on that. Thank you so much. I am assuming that's what any vendor might do if they supply Labview functions with their products.

0 Kudos
Message 4 of 9
(5,013 Views)

HoneyBadger1957 ha scritto:

Thank you. I will now learn to use that function. That's what I was  missing. I will study up on that. Thank you so much. I am assuming that's what any vendor might do if they supply Labview functions with their products.


Yes it's a common situation (although not mandatory): you get a driver, a dll to control that driver and LabVIEW vi's that wrap calls to the dll.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 9
(5,005 Views)

The manufacturer didn't make it easy to find the command protocol for this board... It's zipped up in this archive: http://s3.amazonaws.com/s3.image.smart/download/101-70-118/20-018-910.rar in the file "usb command.jpg" (that's right, a JPEG of text).

usb command.jpg

You'll need to send these commands using the FTDI D2XX driver, or you could simplify things a lot by enabling the virtual COM port (VCP) in the FTDI driver, and then using VISA to send the commands.

 

0 Kudos
Message 6 of 9
(4,984 Views)
Solution
Accepted by HoneyBadger1957

It actually seems to be even easier than what people are suggesting with DLLs and C#. 

 

This should show up as a serial port on your computer. I attached a file which is apparently the ON and OFF command you send to the serial port for each relay.

 

So find the appropriate COM port in labview, open it with the communication parameters that are listed in the JPG, then write out those HEX strings using the serial write commands.

 

Hopefully that works as it is the easiest path forward.

 

- Chris

0 Kudos
Message 7 of 9
(4,980 Views)

Rif thanks. Very good info. 

0 Kudos
Message 8 of 9
(4,955 Views)

ok great I used the VISA commands you sent me and it works nicely. Thanks again.

 

 

0 Kudos
Message 9 of 9
(4,944 Views)