Posted 25 Oct 2016 Working with a project that reads an RF-ID via RS232. I posted a lot of questions about this project because I'm new to Mitsubishi PLC's and it's hard to understand some of the commands from the help menu. I'm hoping you can help me once again with the TO Function. I attached a photo. Can someone explain what is U5 for example and how the function works? Thank you so much Share this post Link to post Share on other sites
Posted 25 Oct 2016 If i'm not wrong.. Using the first line... U means Head I/O number U5 means module with head I/O number of X/Y50 H93 means the memory adress of module. You need check the manual module to know for what this memory is used K0 is value to be written in address H93 K1 is the lenght of words to be written Share this post Link to post Share on other sites
Posted 25 Oct 2016 So looking on my HW configuration i can tell that the module corresponding to U5 is a RS232 QJ71C24-R2. This means that starting from X/Y50 are points used to address this specific module. H93 is the particular address that will be written with 0 in this case. But the K1 part is not so clear. Either it's one word to be written or one bit of a word ? Share this post Link to post Share on other sites
Posted 25 Oct 2016 Sorry for misunderstanding K1 is number of data blocks to be written (BIN 16 bits) Share this post Link to post Share on other sites
Posted 25 Oct 2016 Ok. Hope I got it right (i can be a bit challenged to understand sometimes). On my RS232 module starting from address H93 till 16 bits after will be rewritten with 0 in this care. Did I understand correctly? Share this post Link to post Share on other sites
Posted 25 Oct 2016 TO is used to send single word data to an expansion module buffer memory. FROM reads data from buffer memory to the CPU. They both have the same arguments. U5 is the 5th unit. The number is based on how many slots it is away from the CPU in the XY assignment (first 2 digits) e.g. Unit starting with X050, X051 etc. Next is the buffer memory address in the module in hex (it can also be specified in decimal). This address map will be documented in the module manual. K0 is the data in the CPU to be moved. This case it's a constant so the same value will be written to all points in the buffer mem. It could also be the first address of an array of devices. In this case the first data point n in the CPU will go to data point n in the module, data point n+1 to point n+1 in the module and so on. The last argument specifies how many points of single word data you want to move. E.g. Ux H93 D20 K3 would move D20, D21, D22 to buffer mem. H93, H94, H95. Its important to realise that you are interacting with the module using 16 bit registers here. If you want to send bits you have to move them in blocks of nibbles (4 bits, that just how Mitsubishi do it). So to send M1, M2, M3, M4 (1 nibble = K1Mx) you would put Ux H93 K1M1 K1. Ux H93 K4M1 K2 would move the 32 bits M1~M32 to H93 and H94. Share this post Link to post Share on other sites
Posted 25 Oct 2016 So in my case it sends only the constant 0 to address H93 that I found is : DTR/DSR(ER/DR), DC control designation : • Transmission control (b0) 0: DTR/DSR control 1: DC code control • DC1/DC3 control (b8) 0: No control 1: Controlled • DC2/DC4 control (b9) 0: No control 1: Controlled I need to search a bit more to understand exactly which of these does it reset but I get the functionality now. Thank you so much. Share this post Link to post Share on other sites