11-06-2017 03:57 AM - edited 11-06-2017 04:05 AM
Hello everyone,
I'm trying to simulate the DMX512 protocol using the hardware above, to try and control a RGB light, with no success. I'm hoping you guys can help me.
Hardware:
cRIO-9075 CompactRIO Controller
NI-9871 4-Port, RS485/RS422 C Series Serial Interface Module
Compact Par 7-3 RGB light (Dutch manual, sorry) (For testing only, the main application will contain more DMX hardware)
DMX512 protocol:
https://en.wikipedia.org/wiki/DMX512
Baudrate = 250kbaud
The content of a frame comprises a set of serial bytes (slots) sent with eight bits of data, one start bit, two stop bits. The frame starts with slot 0 and ending with the last implemented slot, with a maximum total of 512 slots.
The frame composition of a n-byte DMX Frame may be summarised as:
FPGA Implementation:
Measurement:
I'm measuring pin 8 and pin 9 each with a probe, on the DB9 connector. I'm fairly confident that I have the shape of the DMX protocol correct from previous testing. What you are seeing here are the 2 stop bits of each frame with 00h as data. From my understanding of RS485, one of the signals on the scope should be inverted. I think this is the reason that my RGB light does not react on the signal that I'm sending to it.
Am I'm doing anything wrong here? Please help. Kudos will be given. Thank you.
Solved! Go to Solution.
11-17-2017 04:28 AM
I solved the problem. It is important to note that the RJ50 to DB9 converter from NI is used in combination with TEDS and is NOT a one to one convertor. This was the reason that my signals on my scope were not what I expected.
To create the DMX protocol on an FPGA using the NI-9871 module, you can use this code: