LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Thorlabs KDC101 Communication

Solved!
Go to solution

What I would reallly like to do is just open a Serial/VISA and just loop until I either lose conenction or press stop. I have done this in the past with TCP/IP and sockets, but I can't seem to do the same with serial... Is there a way to do that with Thorlabs devices or do you have to have the DLL and such?


Thanks,

SM

0 Kudos
Message 11 of 28
(4,606 Views)

The two DLLs that are missing are in the Kinesis download from here:

 

Kinesis download page

 

Choose whichever one of the 3 options applies to you (Kinesis 32-Bit Software for 32-Bit Windows, Kinesis 32-Bit Software for 64-Bit Windows, or Kinesis 64-Bit Software for 64-Bit Windows).  Install it.  When it's installed, the DLLs will be found in "C:\Program Files (x86)\Thorlabs\Kinesis" (or whatever directory you actually installed it in, if not the default).  I would recommend you copy all of the DLLs from there into the same directory as your project file.

 
Message 12 of 28
(4,594 Views)

Ok I installed the DLL. I put the serial number for my Kcube and now I get an error: 1386, Constructor Node in Kinesis no front panel-3.vi. Any ideas as to what I am doing incorrect?

 

Thanks,

SM

0 Kudos
Message 13 of 28
(4,589 Views)

Also if you still want to try sending commands manually, how have you been doing it so far?

 

If you look at page 21 of the manual, it shows an example of sending the "Identify" command.  Assuming you've opened the connection properly, this would be one way to assemble the command to send in LabVIEW:

Thorlabs byte packing.png

The strings in that manual are hex codes that you have to convert to bytes.  So the actual data you send, if formatted as a string, looks like "#   ! " because of those 6 characters, only 2 are printable (23 and 21).  

 

I haven't done it this way myself though, I just use the DLL interfaces...

Message 14 of 28
(4,587 Views)

Error 1386 means you need to add a config file for your LabVIEW EXE to work with .NET 4.0 or later.  

 

National Instruments page on how to do it

0 Kudos
Message 15 of 28
(4,584 Views)

Yes I am still wanting to send commands manually. And I am not doing well with it at all...

 

Which manual are you looking at? I don't see that anywhere in any of my manuals. I don't know if I have opened the connect properly or not... Is there a way to do this connection with VISA's?

 

I also changed the .NET 4.0 or whatever per the instructions on the NI page you posted. Now it is causing other issues...

 

Thanks,

SM

0 Kudos
Message 16 of 28
(4,580 Views)

The manual I am looking at is the one you linked to in your very first post.  This is on page 21:

 

MSG_MOD_IDENTIFY.PNG

Message 17 of 28
(4,577 Views)

Right yeah, ok I see now. I tried adding that in to the demo code I found here:

http://www.ftdichip.com/Support/SoftwareExamples/CodeExamples/LabVIEW.htm, but it didn't help, I still am getting no messages back (or in this case, the controller LED's are not flashing)...

 

Was that a "no" on how to do it with VISA's? Like even establishing serial communication with a device like this?

 

Thanks,
SM

0 Kudos
Message 18 of 28
(4,574 Views)

Regarding this message: "Error 1386 means you need to add a config file for your LabVIEW EXE to work with .NET 4.0 or later."

I tried what it said to do and now with your "no front panel" VI I am getting "Invalid Poperty" and "Invalid refnum class" errors... Any ideas?

 

Thanks,

SM

0 Kudos
Message 19 of 28
(4,572 Views)

I developed my code with the Kinesis 1.6 DLLs.  It looks like they're up to 1.8 now.  For each of the nodes you may have to click on them and re-select the method or property name to get it to work (sometimes LabVIEW doesn't handle version changes well).

 

Also, if you can probe the output of each node in succession, does the error come out of the first constructor node or does it come out of other nodes later in the list?

0 Kudos
Message 20 of 28
(4,551 Views)