Search the Community
Showing results for tags 'com rx'.
Hi, I'm trying to build a snooper that works on a modbus RTU network, to test a controller built by a third party. In this situation the Unistream is neither a master or slave, so the built-in modbus RTU configuration isn't suitable. I'm struggling to to get messages recieved consistently using the COM Rx ladder block. (it doesn't help that this ladder function isn't documented in the help file, specifically how it determines message boundaries in the absense of STX/ETX characters). I'd like to know that each time the "Data Arrived Bit" goes high, the first "RxLength" bytes in the "Rx Buffer" are new bytes, but that doesn't appear to be the case. With the attached code, I get an entry in the 'Raw' Data table for almost every scan. With condition before the COM Rx removed, it works better - but not a lot - there are lots of duplicate message fragments, but occasionally I get an unbroken and unduplicated sequence of characters which can be reassembled into a valid message. Any recommendations on how best to use the COM Rx function for this?