06-09-2011 09:10 AM
Hello,
I have a Si5325 clock multiplier from Silicon Labs. I have a CD with the driver and the software for manipulating the board.
However, I would like to control the board with LabVIEW. This is the first task of that kind for me. Could you, please, give me some instructions what should I do, how should I start, what should I consider?
What I know so far is that the device is controlled by its software using two main files: “Registry Map File” and “Settings File” (both are text files). I have some understanding on the structure and the syntax of these files. I suppose, I have to manipulate these files in LabVIEW if I would like to operate the device. Or am I wrong? The other problem is that I am not sure how to communicate with the device. According to the specifications, the device is I2C/SPI programmable. I don’t have much experience with these two interfaces/standards. I connect to and communicate with the device via USB.
I also played a little bit with the Port I/O VIs from the Connectivity functions group. When I load the library “SiUSBXp.dll”, which I think is the driver library, I see different functions, but I am not sure if I have to use this approach at all. Maybe I have to you NI-VISA, but I don't have much experience with it either and I am still getting familiar with this matter.
I would appreciate any help. Thank you very much in advance!
Rado
06-09-2011 09:34 AM
Here is some addition information if necessary:
http://www.silabs.com/products/clocksoscillators/clocks/Pages/LowJitterClockMultipliers.aspx
06-14-2011 08:02 AM
Hello Rado,
if you connect to the Si5325 via USB, you must have some kind of adaptor or breed board wired to the chip. This would also explain why you have a driver software at hand.
To control the chip from LabVIEW, several options come to my mind:
a) use an USB-to-SPI interface like the NI-8451 (http://sine.ni.com/nips/cds/view/p/lang/de/nid/202368) to connect to the chip. You can then send low-level commands to the chip using the NI-845x driver's API. The SPI "command" strings that you can use to make the clock multiplier chip do something should be available in the manufacturer's documentation - NI will not be able to help you with this.
b) keep the adaptor that you currently use and call the driver software that you have already installed through DLL calls, ActiveX, .NET, TCP/IP commands, ... (whatever the software offers). This means that you will not talk directly to the Si5325, but use LabVIEW only to call specific functions already implemented in the driver software. To find out which driver functions calls are necessary to reach the desired modes of operation of your chip, you will once again want to read the manufacturer's documentation, as there is no standardized driver command set which could have be implemented in LabVIEW beforehand.
c) modifying the text files that come with the driver application in LabVIEW could be another option, but I would guess that these files are only read once each time you start the manufacturer's driver application. So you would have to manually close and re-start the driver software each time you made a settings change in your LabVIEW application, if the driver software does not offer command line parameters that allow you to download a setting to the chip and then exit the driver call directly. A first attempt to see if this was possible would be to call the driver executable that you have used before (let's call it CoolDriverApp.exe for now) from the "windows command line" (Windows » Start » Run » cmd.exe) with something like "/?" or "/h" as a command line parameter [resulting in a command string like C:\Program Files\CoolDriverDirectory> CoolDriverApp /h). If you are lucky, you will see a help text explaining the valid command line parameters.
d) NI-VISA would only be an option if the USB adaptor that you are using supports the USB_INSTR or USB_RAW class and you had (see options (a) and (b)) had the chip's command set at hand. Then you could write your own VISA Instrument Driver, which you could then call from LabVIEW.
As you can see, regardless of which path you chose, you will need more information from the chip's manufacturer...
Best regards,
Sebastian
06-16-2011 04:52 AM
Hello Sebastian,
I managed to create a NI-VISA driver. Now, I can see the device through the Measurement & Automation Explorer (MAX). From here, I can see that the device is USB_RAW class. What I don’t understand is how to send commands to the device.
In one of the documents I have, there is a “Register Map” and “List of All Controls”. I understand the structure of the Register Map File and the Settings File. I also understand how they are related. I can easily program the device using its software and I can export the two files. The problem is that I am not sure how to do that using LabVIEW. Which VISA functions would be necessary? I even tried to capture the USB traffic and commands but I didn’t see anything helpful in this information.
You can find as attachments some sample configuration files just to have an idea if necessary. The software exports the settings file into XML and it seems slightly different, but the real commands/functions are as shown in the “default settings map.txt” file.
Any ideas?
Best regards,
Rado
06-22-2011 10:01 AM - edited 06-22-2011 10:03 AM
Hello Rado,
first of all - there is no way that LabVIEW could automatically make use of your register map text files - you will have to implement your own architecture to make sense of the register values. To get started with register-based USB Raw communication using NI-VISA, you might want to take a look at the following documents and examples:
How Can I Communicate With a Device Using NI-VISA USB RAW Mode?
http://digital.ni.com/public.nsf/allkb/E3A2C4FE42D7ED0D86256DB7005C65C9?OpenDocument
USB RAW Controller
https://decibel.ni.com/content/docs/DOC-2022
USB RAW Bulk Communication with LabVIEW
http://zone.ni.com/devzone/cda/epd/p/id/3622
Control Extra Mouse With USB-RAW
https://decibel.ni.com/content/docs/DOC-3422
Best regards,
Sebastian