LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview with DMX

Hi all,

 

I am trying to control a DMX fog machine with labview (the fog machine works similarly to DMX RGB lights). The fog machine only has 1 DMX channel. 

I have a usb to DMX cable which works with a FTDI chip. I downloaded the driver from the website https://www.ftdichip.com/Drivers/VCP.htm to be able to see  it in MAX. I have the VI attached, but haven't been able to make it work.

The thread https://forums.ni.com/t5/LabVIEW/Open-DMX-to-control-RGB-LED-lights/m-p/1054871#M468659 deals with a similar issue.

 

I am very new to labview and would appreciate any help.

 

Thanks!

 

0 Kudos
Message 1 of 9
(4,918 Views)

Hi lollol,

 

I have the VI attached, but haven't been able to make it work.

No wonder it "doesn't work" as it is an empty VI…

 

I downloaded the driver from the website https://www.ftdichip.com/Drivers/VCP.htm to be able to see  it in MAX.

How do you see it in MAX? As a virtual COM port?

What does the manual say about the commands to be send over that VCP?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(4,904 Views)

Sorry - attached is a VI and a screenshot of MAX. 

I want to be able to send the machine numbers between 0 and 255, with the settings 250k baud rate, 8 data bits, no parity, 2 stop bits, no flow control.

 

Thanks!

Download All
0 Kudos
Message 3 of 9
(4,894 Views)

Hi lol,

 

why are there so many coercion dots in your VI? Why are there indicators without a label?

 

I want to be able to send the machine numbers between 0 and 255, with the settings 250k baud rate, 8 data bits, no parity, 2 stop bits, no flow control.

Like this?

check.png

Usually you don't close a (serial) port immediatly like you do in your VI…

 

Basic stuff (to be learned by taking the free training courses): create constants by right-clicking inputs of subVIs/functions!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(4,876 Views)

Hi,

Here is my updated VI. I am just confused why you removed the start bit?

 Thanks for your help.

0 Kudos
Message 5 of 9
(4,869 Views)

 Hi lol,

 

I am just confused why you removed the start bit?

I removed that Rube-Goldberg array handling in your code because I didn't know what you are trying to do here. You didn't mention any "start bit" before…

(When you want to send more than one byte then just pre-/append more U8 values using this BuildArray node!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(4,838 Views)

Hi GerbW,

 

Yes, I need a start bit. The timing of the signal goes:

-88 usec break

- 8 usec mark after break (MAB)

-Start code 44usec (same size as channel data but all values 0)

- Mark between time frames up to 1s

- Channel data, 44 usec (8 bit value + one start and 2 stop bits)

The protocol is explained here: http://www.dmx512-online.com/dmx512_packet.html

 

These time aren't reflected in my program which is probably one of the reasons why it doesn't work. Could you help me integrate those?


Thanks,

 

Juliette

0 Kudos
Message 7 of 9
(4,812 Views)

Hi lol,

 

I have a usb to DMX cable which works with a FTDI chip. …

These time aren't reflected in my program which is probably one of the reasons why it doesn't work.

No, these timings should be handled by your USB-to-DMX converter.

Read its manual about how to setup the communication!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(4,791 Views)

@lollol0606 wrote:

 

These time aren't reflected in my program which is probably one of the reasons why it doesn't work. Could you help me integrate those?


They really can't be solved in software. You are running under a non-deterministic non-realtime OS. That alone will make it impossible to reach realtime reaction times of even 1 ms. You are lucky if you get reproducably about 10 ms accuracy here. In addition the VISA serial communication that you use goes through several layers of drivers that all add their own latency and make it impossible to get even near your us timing requirements from the application level.

As Gerd already mentioned, your serial port to DMX converter should handle these timing requirements if it is worth its money (even if you got it for almost nothing), as such requirements can't be solved reliably on a normal desktop OS.

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