01-30-2019 01:25 PM
Hi all, I have a number of cRIO-9068s that I want to add very simple local HMIs to. Those don't have a displayport so I am thinking of connecting it to a touch panel PC via RS-232. I could use ethernet but don't want to be reliant on that if the router is down or a cable is disconnected. So I am thinking of using the Tag Engine Communication UDP module, and modifying it to read and write to the serial port. As long as you read all bytes at port with 0 timeout it seems like behavior would be very similar to how the UDP function behave. Any caveats?
Solved! Go to Solution.
01-30-2019 01:33 PM
How about hosting a lightweight web HMI in cRIO (you're using a PC anyway)?
01-30-2019 01:51 PM
hmmm that is an intriguing possibility if I knew the network were always there. The serial option does have some problems that make it harder than just swapping serial writes and read for the UDP, as a UDP packet is either all delivered or dropped. With serial, random bytes and bits can be dropped so framing and checksums is something you need.
01-30-2019 01:57 PM
Hi MarkCG, if you need serial rather than just converting the UDP module the other option could be use the MODBUS module, that one already supports serial so you wont need to do anything to the module, and you will just need to implement mod bus on the UI computer.
Also depending if you have Ethernet ports in your controller you could use a direct connection between the UI and the controller, this should be as almost the same as having the serial cable.
Best Regards
01-30-2019 02:33 PM
@MarkCG wrote:
Hi all, I have a number of cRIO-9068s that I want to add very simple local HMIs to. Those don't have a displayport so I am thinking of connecting it to a touch panel PC via RS-232. I could use ethernet but don't want to be reliant on that if the router is down or a cable is disconnected. So I am thinking of using the Tag Engine Communication UDP module, and modifying it to read and write to the serial port. As long as you read all bytes at port with 0 timeout it seems like behavior would be very similar to how the UDP function behave. Any caveats?
Would the touch panel PC also be running DCAF? The TEC module is really meant to pair two DCAF modules so if you are just reading and writing serial data without a DCAF engine on the other end I wouldn't suggest starting with the TEC module.
To be fair, even if you are pairing two DCAF modules, I would suggest starting with the E2E module as the base. They are both functionally very similar but I think the E2E module is cleaner and has much more well defined points of extension for adding new transfer mechanisms (the README outlines the basics but there is a PDF in the documents folder that goes into a bit more detail).
01-30-2019 04:07 PM
The modbus module could be good. I have seen modbus implementations where if you want to read 100 registers, the master will go and read each one of them individually, even if their addresses are contiguous, writing and reading the serial port sequentially. That's really slow and inefficient, it makes way more sense to read all contiguous registers with one command. However from looking at the code I am seeing that there are VI's that seemingly "clump" the requested registers into contiguous blocks for reading. Is that what is going on?
But yes I do intend to have DCAF on both HMI and cRIO. Both ethernet ports are spoken for-- one to the main network and the other to ethercat slaves. That's why I'm looking at serial. I'll definitely take a look at the E2E module if modbus is too clunky to setup or slow. The nice thing about the UDP module is the module linking across engines so that's why I thought of it first.