[IDLE] The Boston LabVIEW User Group Community

cancel
Showing results for 
Search instead for 
Did you mean: 

4 Channel USB Relay Board Driver

Hello all. I have a 4 channel USB relay board, k138402bsjh, 1982-USB4CH, that comes with no Labview drivers. It does come with a DLL file and some COM file. However I do not know how to access these with Labview to write my own custom Labview function. I some one could point me in the right direction for the information I would need to study it would be appreciated.

 

Thanks,

HoneyBadger1957

0 Kudos
Message 1 of 8
(9,372 Views)

Looks like this board uses an FTDI USB adapter chip. Are you going to be using it with Windows or some other OS? The following applies to Windows. When you install the board and its driver, you should see something in the Device Manager / Ports section. Most likely it will be a virtual COM port. If yes, you should be able to program it using NI-VISA. Another option is to use LV wrappers for direct calls to the FTDI D2XX DLL that use Call Library function. Example code for that is available on the FTDI web site. All that said, you'll still need to know specific commands for controlling the boards.

 

If your platform is Arduino or Raspberry Pi, then I doubt that you'll be able to control it from LabVIEW. The only venue to look into is LabVIEW Linx from labviewmakerhub.com (requires LV2014); it it supports VISA, then you can do it; otherwise I doubt it.

0 Kudos
Message 2 of 8
(9,367 Views)

I was able to use the NI VISA to turn on the relays. However I would like to try the call library function in Labview because I have not used that yet. I feel this is something I really need to learn how to use. Thanks for the help

0 Kudos
Message 3 of 8
(9,358 Views)

Heyeeee,

Could you tell me, please, how did you can use the NI VISA to turn on the relays.?

I am currently working with same board

 

Regards

Sinan

0 Kudos
Message 4 of 8
(8,889 Views)

 I am also working on this. Any examples would be greatly appreciated.

0 Kudos
Message 5 of 8
(8,515 Views)

Well, actually visa didn't work well. I couldn't actually select which relay to turn on. I think the relay that went on was fluke. I couldn't make it repeatable. I found an example using FTDI call library function blocks that worked but it was terrible slow. Probably due to the fact that whole thing used sequence structures, a lot of them. I'm at work now and don't have the examples with me. I found them at home. but tomorrow I will post the working example for you. Maybe you can make it faster and we can all benefit from it.

Mark R Rivet
0 Kudos
Message 6 of 8
(8,493 Views)

 I will post  a working example that I found tomorrow. It was very slow, but I think it can be fixed. I can't post now because I'm at work and the example I found is at home. Tonight going out with my daughter for dinner and a movie. That's why I can't post tonight. But tomorrow.

Mark R Rivet
0 Kudos
Message 7 of 8
(8,488 Views)

Hey everyone,

 

Just as a heads up, this is the forum for LabVIEW users in the Boston area. It's great to see activity here, but in general you'll get better visibility posting in the product area forums.

 

Case in point: the original poster also posted this question to the general LabVIEW forum here (https://forums.ni.com/t5/LabVIEW/writing-labview-driver/td-p/3734306), and it looks like the suggestions over there got it working.

William R.
0 Kudos
Message 8 of 8
(8,481 Views)