Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Conrad USB 4x relay board

Hello,

 

I am unable to control the Relay-Board with Labview. There is a Silabs CP2014 Chip on this board, which controls the relays directly (GPIO). I tried to import the attached DLL in Labview, but how can I create a COM-handle like the manual suggests? Does anybody has some experience with this Chip and the mentioned DLL?

 

Thanks 

 

 

0 Kudos
Message 1 of 16
(8,351 Views)
Please attach an English version of the document.

If you have a virtual com port that is visible on MAX, you can use the VISA functions instead of the dll, assuming you have a list of the commands.
0 Kudos
Message 2 of 16
(8,343 Views)

The English version starts at page 4 😉

 

Unfortunately I dont have any direct serial interface commands. I think the USB-to-Serial-Chip controls the relays with some GPIO-Pins and the only way to set these GPIO-States is trought the dll. Please correct me if its wrong ^^

0 Kudos
Message 3 of 16
(8,326 Views)
Sorry, I didn't read far enough.

The serial commands appear to be in the user manual - http://www.conrad.com/ce/en/product/197720/Conrad-8-Channel-PC-Relay-Board-RS232-Serial-24Vdc-7A

0 Kudos
Message 4 of 16
(8,317 Views)

I have the 4-channel-version: http://www.conrad.com/ce/en/product/393905/Conrad-relay-board

 

You are right, the 8-channel-board is controllable with serial-interface-commands, but for all I know, the 4-channel-board has no such interface.

0 Kudos
Message 5 of 16
(8,266 Views)

I have the 4-channel-version: http://www.conrad.com/ce/en/product/393905/Conrad-relay-board

 

You are right, the 8-channel-version is controllable with serial-interface-commands, but for all I know, the 4-channel-board has no such interface.

0 Kudos
Message 6 of 16
(8,266 Views)
I'm not sure why the vendor would have a different interface but they should be able to confirm that. You should be able to confirm it yourself quickly enough. Use a terminal emulation program such as putty/terraterm or MAX.

In any case, have you tried the import wizard to use the dll?
0 Kudos
Message 7 of 16
(8,291 Views)

Yes, the wizard works fine. For each function in the dll I can create a VI. The only probelm is: How can I create the COM-handle for a specific COM-port?

0 Kudos
Message 8 of 16
(8,282 Views)
Please read the manual again. It clearly states that the CreateFile function must be used first top create a handle for a specific com port.
0 Kudos
Message 9 of 16
(8,275 Views)

You are right, the manual states:

 

HANDLE hMasterCOM = CreateFile ("\\\.\\COM3", GENERIC_READ | GENERIC_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, 0;

CloseHandle(hMasterCOM);
hMasterCOM = INVALID_HANDLE_VALUE;

 

This is Visual C++ and I don't know how to merge this function in LabVIEW.

 

 

0 Kudos
Message 10 of 16
(8,272 Views)