Hello everyone, Earlier I created an application that changes the RSUNI baud-rate and parity settings based on a CSV file on the PLCnext: https://www.plcnext-community.net/en/discussions-2-offcanvas/dynamically-set-rs-uni-parameters.html That has been working very well (Thanks Martin!) and now we want to take it to the next step. I already created an application that detects what modules are connected to the axiobus. (e.g. DI8/DO8 in slot 1 and RSUNI in slot 2) I based it on this: https://www.plcnext-community.net/en/hn-makers-blog/473-dynamic-axiobus-configuration-totally-iec-61131.html (which is based on bus conductor). Based on the order number that we can read, we know what module is connected to what slot. Then we configure the right parameters for the RSUNI (or SE RS485) module. The next step is to connect the MB_AXL_F_RSUNI_Master_2 functionblock (from the Modbus_RTU_10 library) to the RSUNI. (If neccesary I could update to Modbus_RTU_11.) This was done through the IN/OUT ports. But since now the AXL F physical module is connected to PLCnext Engineer, I don’t have these ports available anymore. Only a big DI4069 IN-port and DO4069 OUT-port. How do I connect the data from the RTU master functionblock to these ports? Notes: I want to avoid using C++ on the PLCnext since the full application is IEC61131 as of this moment. I have read the datasheet on the process data. But I don’t fully understand how this process works yet. Also I saw a couple of other interesting posts on this forum, but that’s all based on C++ and it mentions a manual I can’t seem to find. (like this one https://www.plcnext-community.net/en/discussions-2-offcanvas/configure-rsuni-1h.html)
Hello Thht, this procedure is pretty much the same in IEC as in C++. You will have to calculate where on the Axio Bus processdata(PD) Di/DO4096 the data of your RS UNI will be located. E.g. AXIO BUS looks like this DI8 DO8 RSUNI RSUNIFirstElement = DIO4096[DI8_PDAmount+DO8PDAmount] RSUNILastElement = DIO4096[DI8_PDAmount+DO8PDAmount+RSUNI_PDAmount - 1?] And move the area hat is relevant to the MB_RTU_Input variables. via memcpy or something similar. The length and content of the PD for each module can be found in the manual of each Module. phoenixcontact.com → axl f RS UNI → Downloads → Manual/Handbook/Datasheet
Hello Oliver, Thank you for your reply! The functionblock I have reads the PD data length from the module. So that is convenient. Since the PD length is only 10, but the data in the Modbus_RTU_Master functionblock is longer, how do I know what to write to those variables? Do I just paste 10 words from the Modbus_RTU_Master functionblock every time?
The processdata have to be connected / forwarded to the MB AXL RS UNI REC/SND FB Those inputs / outputs are 20 byte / 10 Words as well. The Send and RCV FB will forward the Data to the MB RTU Master FB via an InOut Variable Have a look at the Examples included in the Modbus_RTU library to see how to implement RS Uni and SE-RS485 Recieve and Send parts. Those are not identical… [attachment]MBRTUHelp.jpg[/attachment]
