I'm trying to send Art-Net packages to an ArtNet-DMX-Converter via NBS.UDP_Send to switch between several DMX Channels within one Universe. I use wireshark to check the packets, and seem to be facing two difficulties:
- all my UDP Packets seem to be within the port range 1740-1743, instead of the 6454 that I fed to myUDP_Send
- the UDP Packets I am sending cointain a whole lot more data than just the UDP header and what I put into myUDP_Send.pData
As my CodeSys experience isn't off the charts, I want to ask you guys whether what I'm trying is possible, and if so, how.
Cheers,
Leon
Last edit: leonschoeppl 2020-05-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
this helped alot. I didnt realize there were two different libraries. Some examples online would have compile errors. I knew it was a library issue but couldnt figure it out until I read this. Your example code is great. Thanks!
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you ever want to share your ArtNet-DMX-Converter project in forge, I will be happy to answer any questions you might have about that. You can either use iec-snippets if it's small, or add a new project or library (depending how you have packaged it).
Sorry for not answering any quicker and thanks a lot for your piece of code!
I did update the projekt, switched to NBS SP16 and implemented what you sent me, but sadly I still seem unable to achieve the desired results. When using Wireshark to monitor the local Network, not a single UDP message shows up on port 6454. Any more wisdom you could share with me?
EDIT: I am receiving 'WRONG_CONFIGURATION' errors from both myUDP_Peer and myUDP_Send.
In case it is relevant, I'm using a PixtendV2, i.e. CodeSys for RaspberryPi!
Cheers
Leon
Last edit: leonschoeppl 2020-06-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found a project from some years ago. Is in a very raw state, but worked well for some tests/events with this ArtNet-DMX-Gateway: https://shop.ulrichradig.de/Module/Light-Control-DMX/ART-NET-QUAD.html
Disabling the firewall was necessary to get the UDP pakets out. Maybe you can have a look at this.
Thanks for the resources you provided!
About disabling the firewall, are we talking the routers firewall for the network, or is this something host-based to do with CodeSys directly?
Cheers
Leon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using the OSCAT libraries for sending ArtNet from a PFC200 with Codesys 3.5.16.0 to a simple ArtNet Node from Ulrich Radig. Thats very reliable since years. Here is some code from the early stage - but still working: http://www.oscat.de/community/index.php/topic,880.msg13485.html#msg13485
All the best,
annD
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
UPDATE: Things are starting to look a lot better, as I can now consistently send Art-Net Packets. I'll post the code once I'm happy with it. Thanks a lot to @i-campbell!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey there,
I'm trying to send Art-Net packages to an ArtNet-DMX-Converter via NBS.UDP_Send to switch between several DMX Channels within one Universe. I use wireshark to check the packets, and seem to be facing two difficulties:
- all my UDP Packets seem to be within the port range 1740-1743, instead of the 6454 that I fed to myUDP_Send
- the UDP Packets I am sending cointain a whole lot more data than just the UDP header and what I put into myUDP_Send.pData
As my CodeSys experience isn't off the charts, I want to ask you guys whether what I'm trying is possible, and if so, how.
Cheers,
Leon
Last edit: leonschoeppl 2020-05-09
more posts ...
1740-1743 is the communication ports for the Development system or a HMI, so you would see them even if you had no NBS running.
You will need instead a UDP_PEER.
https://help.codesys.com/webapp/2WcJHFNpdguN8FilHzhiwjDereA%2FUDP_Peer;product=NetBaseServices;version=3.5.16.0
Please also use the SP16 version of the library, it is amazing!
Let me know if you are still stuck after using UDP_PEER and I'll try to track down an example.
Thanks mate, I'll try going with UDP_Peer next week!
Hey there again!
I've now tried using myUDP_PEER without success, as it always puts out an Error/ sets xError to TRUE. I could really do with a code example, as the one I used (NetBaseServicesDemo.project from https://help.codesys.com/webapp/090eefOU8ghnTgjp1u-MsUHjdQY%2Ffld-Examples;product=CAA_NetBaseServices;version=3.5.15.0) didn't get me where I wanted.
Additionally, the project is in version 3.5.13, so is there any way (other than updating the whole thing) for me to use the SP 16 library?
Thanks in advance and cheers
Leon
Last edit: leonschoeppl 2020-05-15
Which IEC language would you be most comfortable with?
Yes, CAA Net Base Service is replaced with Net Base Services and is slightly different.
Thanks for your quick answer, I'd prefer ST!
this helped alot. I didnt realize there were two different libraries. Some examples online would have compile errors. I knew it was a library issue but couldnt figure it out until I read this. Your example code is great. Thanks!
Have a look at this I put together:
#5 UDP Send and Receive with Net Base Services SP16
Let me know if it helps you on your way.
If you ever want to share your ArtNet-DMX-Converter project in forge, I will be happy to answer any questions you might have about that. You can either use iec-snippets if it's small, or add a new project or library (depending how you have packaged it).
Talk Topic about project #iec-snippets
Sorry for not answering any quicker and thanks a lot for your piece of code!
I did update the projekt, switched to NBS SP16 and implemented what you sent me, but sadly I still seem unable to achieve the desired results. When using Wireshark to monitor the local Network, not a single UDP message shows up on port 6454. Any more wisdom you could share with me?
EDIT: I am receiving 'WRONG_CONFIGURATION' errors from both myUDP_Peer and myUDP_Send.
In case it is relevant, I'm using a PixtendV2, i.e. CodeSys for RaspberryPi!
Cheers
Leon
Last edit: leonschoeppl 2020-06-11
I found a project from some years ago. Is in a very raw state, but worked well for some tests/events with this ArtNet-DMX-Gateway:
https://shop.ulrichradig.de/Module/Light-Control-DMX/ART-NET-QUAD.html
Disabling the firewall was necessary to get the UDP pakets out. Maybe you can have a look at this.
Thanks for the resources you provided!
About disabling the firewall, are we talking the routers firewall for the network, or is this something host-based to do with CodeSys directly?
Cheers
Leon
because I used the winplc I had to switch off the firewall of Windows10 to get the UDP pakets sent and recieved.
I am using the OSCAT libraries for sending ArtNet from a PFC200 with Codesys 3.5.16.0 to a simple ArtNet Node from Ulrich Radig. Thats very reliable since years. Here is some code from the early stage - but still working: http://www.oscat.de/community/index.php/topic,880.msg13485.html#msg13485
All the best,
annD
UPDATE: Things are starting to look a lot better, as I can now consistently send Art-Net Packets. I'll post the code once I'm happy with it. Thanks a lot to @i-campbell!
This is the code I'll be using:
See Attachment for Example WebVisu UI: DropDownMenu changes PLC_PRG.ChannelOnNumber, while the ApplyButton sets PLC_PRG.state to 1.
Last edit: leonschoeppl 2020-06-12