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.
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.
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=188.8.131.52) 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
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!
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 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:
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?
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 184.108.40.206 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,
Log in to post a comment.