Jump to content

Recommended Posts

Hello,

 

I am trying to communicate with the Art-Net to DMX interface (from DMX4ALL) via LAN. I have to send a specific message to the interface so it knows what to do. The message is as you can see in the attachment. 

I can connect to the interface with the "TCP/IP CONNECT" function block, but I cannot communicate with the interface.

Can anyone tell me how I can make the message in the "Protocol: TCP/IP Send" function block?

 

Thanks in advance.

 

Edwin

 

 

 

ArtDmx.pdf

Link to comment
Share on other sites

Hi Edwin,

Set socket as TCP RAW.

Then use TCP Protocol to send message, composed in accordance to DMX rules.

*DMX device in most of cases include number of addressable registers.

You select 1st register address in DMX device configuration.

Details is dependent of used device and it's commands.

You have to have this device tested and working.

Most of manufacturers of DMX devices include test programs to test DMX adapters and DMX devices functionality.

Tell more about used device and answer will be mo detailed.

I hope this helps.

Link to comment
Share on other sites

Thanks for your reply Alex,

 

I already set the socket as TCP RAW and used the TCP protocol to send a message. The problem that I have is that I don't exactly know how to compose the message, it has to start with "Art-Net" 0x00 which is no problem but after that I have to send the following values:

 

- OpCode (INT16) which has to be 0

- ProtVerHi (INT8) which has to be high byte of protocol version (14)

- ProtVerLo (INT8) which has to be low byte of protocol version (14)

Do I need to put 0 at ProtVerHi and 14 at ProtVerLo?

- Sequence (INT8) has to be 0x00

- Physical (INT8) has to be 0

- SubUni (INT8) has to be 0

- Net (INT8) has to be 0

- LengthHi (INT8) for the test I want to set it to 2 (so the first 2 DMX channels)

- LengthLo (INT8) for the test I want to set it to 2 (so the first 2 DMX channels)

- Data (INT8) value for DMX channel 1 to 2

 

My question is: How can I compose this message? Do I need to put 0x00 after every part of the message?

 

The setup is like this:

 

PLC (V350-TR6 with ethernet) --> ArtNet-DMX interface (ArtNet-DMX Universe DR 1.1 from DMX4ALL) --> Lighting driver (Fluvo RGB)

 

I tested the lighting driver with a standard control panel which functions.

 

I hope this helps you to give me an answer. 

 

Thanks

 

Link to comment
Share on other sites

Hi Edvin,

String will be like next:
*I show MI content as 2 bytes.
Bytes are in ASCII for string, in Decimal for numbers. HEX notation will be 0x00 for Byte or 0x0000 for MI.

ID
[Art-Net][0]
[r][A]
[-][t]
[e][N]
[0][t]
*you can use String to ASCII to form this string.

OpCode
[0][0]

ProtVerHi
[0]
ProtVerLo
[14]
[0][14]

Sequence
[0]
Physical
[0]
[0][0]

SubUni
[0]

Net
[0]
[0][0]
SubUni and Net seems to be a start address of your device, which you configured.

LengthHi
[0]

LengthLo
[0]
[0][0]

Length encoded in 2 Bytes, as it will be up to 512. Length is a number of Bytes in Data. Data is variable.

Data (in Bytes)
[x][x]...[x][x]

 

Full packet:
[r][A]; 7 MIs is a constant header.
[-][t]
[e][N]
[0][t]
[0][0]
[0][14]
[0][0]
[0][2]
[127][127]; This is data for your device. Test [0][0] for off, [127][127] for middle, [255][255] for full intencity (in case of LEDs).

I recommend you to allocate vector of max length (header+512 Bytes, 8+256 MIs) for buffer, and use "Protocol TCP/IP Send" to send buffer as a Stream with Indirect length.

This will allow you to send wariable data.

I hope this helps.

Link to comment
Share on other sites

Alex,

 

Thank you for your reply. I tried it but I doesn't function. I found out that the OpCode (for ArtDmx) has to be 0x5000 with the low byte transmitted first. So the code will be as follows:

 

[41] [72] [74] [2D] [4E] [65] [74] [00] [00] [50] [00] [0E] [00] [01] [00] [00] [00] [02] [64] [C8] 

 

Last 2 values are the setpoints which are 100 and 200. 

I am sending it with the Protocol TCP/IP Send and a stream with a fixed length of 20 in this case.

 

I can see that this is transmitted to the device but it is not working, can you what I might be doing wrong?

 

Thanks.

Link to comment
Share on other sites

Edwin,

Bytes [41] [72] [74] [2D] [4E] [65] [74] [00] [00] [50] [00] [0E] [00] [01] [00] [00] [00] [02] [64] [C8] will be converted to MIs in PLC memory (and vice versa)

[72][41]->[7241]
[2D][74]->[2D74]
[65][4E]->[654E]
[00][74]->[0074]
[50][00]->[5000]
[0E][00]->[0E00]
[01][00]->[0100]
[00][00]->[0000]
[02][00]->[0200]
[C8][64]->[C864]
This is how data in MIs looks.

PLC transmits LSB Byte first (the Right one) then MSB (the left one), etc. until the last Byte being transmitted.

I am not knowing, how received data is transposed by device controller.

But I will recommend you to transpose all MIs - swap bytes - and transmit again.

Or you can use well known program, working via Art-Net to DMX interface and capture Ethernet traffic. Then you can see how Ethernet/IP packet designed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...