LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView using Visa and USB interface to program lighs

Hello!

 

We are students from Sweden and we are working on a project. We are using 4 RGB COB LED spotlights (programmable with 3 or 5 channel DMX512) in serial connection and these lights are connected to an USB DMX Pro Interface from Enttec. We run the driver from FTDI (its now a COM Port) and we want to program the lights (turn on/off and color selection in fast speed). The programming should be done in LabVIEW (version 2013). We know that we  have to use Visa to communicate with the USB Interface.

 

1. We want to start and we want to know the basic idea and structure of programming lights using LabView and Visa. How can this be done?

 

2. How USB interface, Visa and LabView communicate?

 

3. Do you have examples of similar situation of light programming?

 

Any answers will be helpful to start.

 

Thank you!

0 Kudos
Message 1 of 12
(5,099 Views)

1. What determines when the lights should change and what colors should be selected? Is this controlled by a user? Is it by some algorithm? Is it from a file? If so, what is the file format? Is it controlled by some external stimulus such as sound or temperature? If so, how is that data acquired by the computer?

 

The answers to your first question may depend on the answers to these questions.

 

As students, an important lesson for real projects is that you must develop a good specification for what the project must do before starting on the implementation.

 

2. The FTDI driver allong with the operating system handles the USB communication and emulates a COM port.You can use the VISA functions and VIs in LabVIEW to communicate with your LED controller as though it were connected to a real RS-232 port. There are examples which come with LV showing serial communication.

 

3. Examples which match your specific requirements are not likely to exist. However, once you have completed the specifications in item 1, we should be able to recommend a suitable architecture for your program.

 

Lynn

0 Kudos
Message 2 of 12
(5,063 Views)

Hi!

Thank you for replying.

There is no external stimulus like sound or temperature.We will manually select (on the computer) the ON/OFF mode or the color everytime we want to take measurements. The ON mode means that the lights go on serially and not all four at the same time.(This is a photonic project so we dont have sound/temperature stimulus just lights and colors in order to detect something).

So the user (we) is going to select the mode and colors.Is this selection happens in LabVIEW in the front panel?

We can also give you an example of what the system(lights) want to do.

 

LabVIEW :

 1) power (ON /OFF) mode   if is ON a) White light to goes "on" serially b) Red light to goes "on" serially c) Blue light to goes "on" serially d)Green light goes "on" and then after a very short time it goes "off" automatically. (There should also be a timer parallel with every option maybe in (ms)).

 

This is the basic idea that we want to built about our lights.In further time we want to add more things like a camera.

 

1. Is this right that we use Visa 'block icon" in the Block diagram in LabView to build up our programme?

2. Do we need to write any strings in Visa to communicate with the USB interface (dmx channels from the lights) or not ?

 

Thank you.

0 Kudos
Message 3 of 12
(5,047 Views)

1. The VISA functions and VIs will be useful for communicating with the LED controller.

2. The strings you may need to write are determined by the command set for the controller. You must get that information from the manufacturer of the controller. I have no idea what command tells the light to be Blue for example.

 

If the sequence will always be white, red, blue, green, and off, then you only need to set the timing. I would use an array of numbers (ms) with an element for each color. Then the program would be implemented as a loop with autoindexing over the time array.

 

I would probaly do something more complicated, on the assumption that as soon as this works, someone will want to do something different, such as change the order of the colors or mix multiple colors. I would use a Producer/Consumer architecture with user inputs handled by the Producer and a state machine in the Consumer to manage the lights.  There are templates and examples of these architetctures with all recent versions of LV.

 

Lynn

0 Kudos
Message 4 of 12
(5,038 Views)

Duplicate thread. Please continue in the other thread.

 

Lynn

0 Kudos
Message 5 of 12
(5,011 Views)

Ok, yes we have to write the strings and to send it to the controller but:

 

1. We have the "API for DMX USB Pro" and the "C-code c++ example" (the link below the `"Developers" heading)  https://www.enttec.com/index.php?main_menu=Products&pn=70304&show=description&name=dmxusbpro  but we are not programmers so we dont know how to read and use them.

2. Where are these strings inserted in LabView-Visa ?

 

We have searched a lot and read the templates but we didnt find a real project or something relevant which could help us.So any real case example would be more helpful.

 

Thank you.

 

0 Kudos
Message 6 of 12
(4,973 Views)

Hi,

For anyone else with this question...

 

I use FTDI chips to convert USB to UART etc and I dont use VISA blocks.

FTDI chips come with LabVIEW drivers and examples which show how to communicate using LabVIEW without VISA.

 

Check the FTDI website :

http://www.ftdichip.com/Support/SoftwareExamples/CodeExamples/LabVIEW.htm

 

Regards

carloman

===============================================================

Take a look at DATEx, FOTEx, HELEx & SIGEx add-in trainer boards for NI ELVIS 1,2 & 2+ and DXIQ, ESSB for NI ELVIS III and myDSP for myDAQ to learn Wireless Telecoms, Signals & Systems, Fiber Optics and Green Energy principles (www.emona-tims.com)
0 Kudos
Message 7 of 12
(4,682 Views)
The original poster's problem has nothing to do with using VISA or not. Your so-called solution would just tie anyone using a serial interface to very specific hardware.
0 Kudos
Message 8 of 12
(4,672 Views)

Yes, however the original posters stated they were using FTDI, and didnt seem to realise that there exist FTDI drivers for LabVIEW.

I wanted to clarify that.

In my experience, as a non-power-LV coder, having used FTDI with LabVIEW, it  makes it very easy to interface via USB.

This would suit students etc and get them going with their hardware, whilst having the benefit of LV on the PC GUI end.

 

Regards,

carloman

 

===============================================================

Take a look at DATEx, FOTEx, HELEx & SIGEx add-in trainer boards for NI ELVIS 1,2 & 2+ and DXIQ, ESSB for NI ELVIS III and myDSP for myDAQ to learn Wireless Telecoms, Signals & Systems, Fiber Optics and Green Energy principles (www.emona-tims.com)
0 Kudos
Message 9 of 12
(4,665 Views)
The vcp driver from ftdi is, in my opinion, much easier to interface via usb. I've used both. Your choice also prevents someone from using an existing instrument driver. I don't see any advantage at all.
0 Kudos
Message 10 of 12
(4,655 Views)