LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB Communication with TLS 260

I am trying to communicate with a TLS 260 system via USB through LabView (2018). This system controls a cornerstone monochrometer, oriel filter wheel and a QTH lamp through a OPS-Q250 power supply. I have installed the TLS utiltiy and have that working, I would like to integrate the functionality of the TLS into a larger LabView program. If someone could put me in the right direction/give any example VI's or any documentation on how this can be done that would be appreciated.

 

Cheers, Drew.

 

0 Kudos
Message 1 of 10
(3,235 Views)

@drewbriley wrote:

I am trying to communicate with a TLS 260 system via USB through LabView (2018). This system controls a cornerstone monochrometer, oriel filter wheel and a QTH lamp through a OPS-Q250 power supply. I have installed the TLS utiltiy and have that working, I would like to integrate the functionality of the TLS into a larger LabView program. If someone could put me in the right direction/give any example VI's or any documentation on how this can be done that would be appreciated.

 

Cheers, Drew.

 


The TLS utility is a LabVIEW program.

 

.

0 Kudos
Message 2 of 10
(3,197 Views)

Reading the User Manual highlights a couple of points:

  • The TLS Utility you want to integrate the functionality of appears to only be available via USB (not direct download)
  • The utility is a LabVIEW application, but I don't see source available in the screenshots of the USB directories
  • It looks (again from screenshots) a lot like a full application with probably limited integration possibilities (at least directly)

Since you don't appear to have the source code (VIs, lvlibs, etc) you probably can't do much with this. Although in principle it is possible to rewrite the code yourself, then integrate it with whatever you want, there doesn't appear (from a quick scan) to be any information in the User Guide that would help you do this.

 

If you can find documentation for some sort of SDK, you might be able to use that. Otherwise, you can try contacting the manufacturer to ask them if they have any publicly available API for the hardware (i.e. a SDK, perhaps in documentation-only form etc).

I don't think you can reasonably reverse-engineer this unless you have a lot of time and nothing else to do with it (but maybe I'm completely wrong and just don't know how).


GCentral
0 Kudos
Message 3 of 10
(3,191 Views)

As mentioned,, the TLS Utility is a compiled LabVIEW application. This means someone from Oriel has gone through the trouble of writing a LabVIEW driver for that instrument, but the application being compiled also means you can't just reuse this driver. You would have to contact Newport if they can dig up the source code for that application and provide you with the VIs for it.

But there is another thread on here that goes about these Oriel/Newport monochromator devices. There appears to be a .Net based sorts of SDK available for download from the Newport site that people in that thread seem to have been able to use to communicate with the device. You still will need to write most of the LabVIEW VIs to interface to the .Net driver but at least it is a start.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 10
(3,185 Views)

Thanks for the response.

 

Yes I cannot find any added VI's from the software at all. However the manufacture does include a dll for the power supply. I have been attempting to use that to access the functionality of the power supply. The rest of the functionality can be accessed through RS232 to the monochrometer.

 

I haven't been able to detect the power supply properly as a USB device through VISA though. Without this I@m unsure how to use the dll.

 

Cheers, Drew.

0 Kudos
Message 5 of 10
(3,177 Views)

Rolf Kalbermatter

Thanks for the thread, I have looked through that already. However, that thread is about control of the monochrometor. In the case of the TLS the Monochrometor is in serial with the Power Supply. This means I need to estabolish a connection to the power supply before accesssing the monochrometor, right? I'm trying to estabolish this connection first.

I will attempt to contact Newport to see what they can dig up for me as well.

 

Cheers, Drew.

 

0 Kudos
Message 6 of 10
(3,176 Views)

@drewbriley wrote:

Yes I cannot find any added VI's from the software at all. However the manufacture does include a dll for the power supply. I have been attempting to use that to access the functionality of the power supply. The rest of the functionality can be accessed through RS232 to the monochrometer.


Do you have some documentation to this effect? Can you share it here. It might help us give better advice.


GCentral
0 Kudos
Message 7 of 10
(3,171 Views)

Unfortunately I don't have any documentation to support this claim. The only piece of documentation I have is the Newport manuals to the TLS, power supply, and monochromator

 

However I know that the cornerstone monochromator is connected in series through RS232 to the power supply (as is shown in the TLS manual). I would assume then that to establish communication to the monochromator one must establish communication to the power supply first and then to access the monochromator as a device in series with this. Which is what I believe the Utility provided by Newport does. I have done this before using GPIB connectors with a cornerstone monochromator, in series with other GPIB connected devices. But I thought that using the one USB from the power supply would be a better choice in this case. Both the Power supply and monochromator has their own DLL available through the Newport webpage, the monochromator has a few example VI's to aid, which is nice. But there is practically nothing about the power supply.

 

Thanks for all the help, Drew.

0 Kudos
Message 8 of 10
(3,163 Views)

So I'm not sure what's connected to what, but it seems (from the manuals and your description so far - please point out each place I go wrong)

  • The TLS Utility runs on a computer connected via USB to the power supply. Other connections (including from the RS232 port visible in figure 16 of the TLS manual) connect (from the power supply) to other hardware elements.
  • The RS232 connection connects to the monochromator, the Cornerstone 260 component
  • This monochromator controls the filter wheel you mentioned in the opening post
  • You want to write a program/driver which controls the power supply, monochromator, filter wheel and QTH lamp. The TLS Utility fills this role but is not extendable/modifiable
  • The power supply lists all of its commands along with settings for RS232, or the driver necessary (OPS.dll) in the power supply manual, p62-67
  • Ch10 of the Cornerstone manual discusses remote control, but doesn't list commands. 
  • The appendix of the same manual gives RS232 settings, along with a summary of syntax and then detailed command lists (Ch16)
  • Ch 18 describes USB operation - MonoTerm, which according to Ch10 is available on an installation USB, gives LabVIEW examples. These might be also available at C:\Program Files\Newport\MonoTerm
  • The power supply can control the lamp
  • The monochromator's commands presumably include appropriate commands for the filter wheel, but I can't see which ones those might be. Hopefully you, with better domain-specific knowledge, can 🙂

With regards to the Power Supply and RS232, the following text probably tells us what we need to know (taken from the first page of Appendix A):

Syntax:
ASCII Text
Received command lines are to be terminated by CR
Transmitted responses are terminated by CR/LF
Parameters separated by a space or “=”
Parameter and Response Types and Format:
ASCII strings representing:
fp : Floating Point : fff.ff or ff.f
i : Integer : iiii
c : Character : c
t : Time : hhhh:mm:sec.th
Sample command: EXPMODE T sets exposure mode to AUTO-TIME

 

This together with the table below that probably has what is needed.

So for example, to turn on the lamp (obviously not tested), you could use the Configure Serial Port to open the port, then the VISA Write to send the message "START<cr>" followed by VISA Read, expecting "ESR[0-9A-F][0-9A-F]<cr><lf>" (not sure why they want a CR for transmitted messages but they return CR+LF...). A successful powering on of the lamp might return ESR81<cr><lf>, but I'm not sure what all the flags are supposed to be (I'd guess without checking 0 is no error though... maybe operation complete would be 0 in which case ESR80?)


GCentral
Message 9 of 10
(3,152 Views)

Thank you cbuycher for the reply. Yes it's an almagamated system as you have described correctly. I would like to extend its capabilities and interface with it as well as other USB/GPIB devices in one LabView program.

 

I have made some progress on this issue today. I was able to gain access to the power supply (which does control the lamp) through MAX. I did this by creating a driver using the NI Wizard and installing it on my system. I now can see the power supply listed as a RAW USB device on the MAX 'Devices and Interfaces' menu.

 

Opening the Test Panel I see the correct information including Pipe setting (verified through USBView) as shown in the attached figure. However; when I try to Query it I get the following error:

 

Read Operation
Error

VISA: (Hex 0xBFFF003E) Could not perform operation because of I/O error.

 

(as shown on the other attached figure) I have used the USB RAW - Interrupt and USB RAW - Control example VI's and get the same error.

 

This error seems pretty general and I haven't found any threads that relate to my issue exactly. Could this mean that my drivers weren't installed correctly? Or would there be a simplier explaination. I haven't used a USBRAW before, but the commands seem pretty simple as you pointed out!!

 

One other quick question, why do you say

"A successful powering on of the lamp might return ESR81<cr><lf>"

I'm unsure where the 8 comes from since the HEX codes given in the "ESR?" Response box of the table lists only 0 to 7 (since it's 8 bit right?)

 

Cheers, Drew.

0 Kudos
Message 10 of 10
(3,142 Views)