C# and DMXsimple library

1,399 views
Skip to first unread message

tristio

unread,
Oct 12, 2009, 9:35:53 AM10/12/09
to DmxSimple
hi,
is it possiable to use a C# environment to send serial data from a pc
to the DMX transceiver? and if yes how is the best way to tackle it?

thanks

Peter Knight

unread,
Oct 13, 2009, 3:53:47 AM10/13/09
to DmxSimple
Yes.
Use SerialToDmx ( http://code.google.com/p/tinkerit/wiki/SerialToDmx )
and port the control function from Processing to C#.

Set the serial port to 9600, then translate this from Processing to
C#:

void setDmxChannel(int channel, int value) {
myPort.write( str(channel) + "c" + str(value) + "w" );
}


Post a working example to the list when you have it.


Peter

tristio

unread,
Oct 15, 2009, 6:42:20 PM10/15/09
to DmxSimple
hi,
and thanks for answering my question. the only problem is that im new
to Processing and i got no idea from where to start from?!?

any helpful tips?

tristan

On Oct 13, 9:53 am, Peter Knight <cathed...@gmail.com> wrote:
> Yes.
> Use SerialToDmx (http://code.google.com/p/tinkerit/wiki/SerialToDmx)

Peter Knight

unread,
Oct 16, 2009, 2:59:38 AM10/16/09
to DmxSimple
Start at http://processing.org . Processing isn't a hard language to
understand.

tristio

unread,
Nov 4, 2009, 4:01:57 PM11/4/09
to DmxSimple
so at the moment i managed to communicate from C# to the
microcontroller via the serial port. my next question is:

if im using a 4 channel DMX lamp (like the one given in the video
tutorial) do i have to send all the 4 channel with their corresponding
value at one go from C#? or can i send each channel one by one
example: channel 1=255 (C#)-> microcontroller->DMX lamp, channel 2=0-
>microcontroller->DMX lamp etc. ?

On Oct 16, 7:59 am, Peter Knight <cathed...@gmail.com> wrote:
> Start athttp://processing.org. Processing isn't a hard language to

Peter Knight

unread,
Nov 5, 2009, 2:52:36 AM11/5/09
to DmxSimple
It sounds like you haven't tried it out on a real DMX lamp yet. That
should be your next step.
Once you've got that working, you will be able to try both solutions
and see what works best for you.

tristio

unread,
Nov 5, 2009, 3:31:07 PM11/5/09
to DmxSimple
thanks for the replay. honestly i havent tried the DMX lamp yet, but
im trying to get the main coding for C# ready first. i did some
research on how the DMX signal is transmitted and it says that all
512bytes must be sent at one go, so im assuming that all the channel
settings for the lamp needs to be sent at one go from C#. i am i
right?

thanks tristan

Peter Knight

unread,
Nov 5, 2009, 3:54:05 PM11/5/09
to DmxSimple
On Nov 5, 8:31 pm, tristio <dontplaymyg...@gmail.com> wrote:
> thanks for the replay. honestly i havent tried the DMX lamp yet, but
> im trying to get the main coding for C# ready first. i did some
> research on how the DMX signal is transmitted and it says that all
> 512bytes must be sent at one go, so im assuming that all the channel
> settings for the lamp needs to be sent at one go from C#.

> i am i right?

No.

From http://code.google.com/p/tinkerit/wiki/DmxSimple :
"DmxSimple does some fancy stuff behind the scenes, so there is no
need to worry about DMX frames, retransmissions and channel orders.
Specify which channels you want at which value, and the library will
handle everything else for you."

Frames are continuously transmitted transparently. When you change a
value in DmxSimple, you only change a value in a buffer. The interrupt
process picks up and transmits the new value on the next frame. You
can change any value in any order, with or without pauses whenever you
like.

tristio

unread,
Nov 5, 2009, 5:16:36 PM11/5/09
to DmxSimple
so if im understanding correctly, the DMXsimple library is just a
convertor which allows you to transmit anytime and any value without
being in order?

On Nov 5, 9:54 pm, Peter Knight <cathed...@gmail.com> wrote:
> On Nov 5, 8:31 pm, tristio <dontplaymyg...@gmail.com> wrote:
>
> > thanks for the replay. honestly i havent tried the DMX lamp yet, but
> > im trying to get the main coding for C# ready first. i did some
> > research on how the DMX signal is transmitted and it says that all
> > 512bytes must be sent at one go, so im assuming that all the channel
> > settings for the lamp needs to be sent at one go from C#.
> > i am i right?
>
> No.
>
> Fromhttp://code.google.com/p/tinkerit/wiki/DmxSimple:
Reply all
Reply to author
Forward
0 new messages