Hello I am using FX3U series PLC, also have installed RS232 output reader but as exaple for activating M1 in my case need to send this type protocal (02 45 37 30 31 34 30 03 34 34) deactivating with (02 45 38 30 31 34 30 03 34 35) any idea why it is different from manual?
In order to read or write 32bit register you need to use WR/QR or WW/QW and set length to two. Beware that the cpu keep data that MSB in higher register but when you read from above command it will return lower register first, you need to swap the data before other operation.
thank u for your solution,but i do not know what WR/QR or WW/QW is,i use(ACTPCCOMLIB) ActFXCPU SerialCom = new ActFXCPU(); there are some methods in the ActFXCPU class,like ActFXCPU .GetDevice("X0", out data); or ActFXCPU .WriteDeviceRandom2(szDeviceName, iNumberOfData, ref arrDeviceValue); ActFXCPU.WriteBuffer() and so on, i can read or write for a 16bit register like D500;but i still do not know how to how to read or write a 32bit register(use C#)?
Seem like you use MX Component for your solution, but in my video explain another method. You can use ReadDeviceBlock() to read the device data from PLC and WriteDeviceBlock() to write data to PLC. With ReadDeviceBlock() and WriteDeviceBlock() you can define first device address and number of device you need to read. Example of program to read 32 bit data: // Create ActFXCPU object ActFXCPU SerialCom = new ActFXCPU(); SerialCom.Open(); // Open connection int[] data = new int[4]; // Prepare variable for receive data SerialCom.ReadDeviceBlock("D0", 4, data); // Read data SerialCom.Close(); //Close connection // Convert 8bit data to 32 bit data long data32 = data[3] << 24 | data[2] << 16 | data[1] << 8 | data[0]; All function for MX Component programming (ver.3) you can find at dl.mitsubishielectric.com/dl/fa/document/manual/plc/sh080272/sh080272o.pdf Next time I will try to make new video for use MX component programming