MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

21 Excellent


About AndreasW

  • Rank

Profile Information

  • Country Germany
  1. Short way to write contacts in OR gate ?

    as gambid wrote if all the bits are sequential you can check them as dword > 0 ( e.g  [>_U K8M0 K0] ) , in this case be sure to use _U so that K8M0 will be treated as unsigned word, by default its treated as signed word an this case it won't work if the upper bit is set  
  2. Mitsubishi Q and SMC JXCD1 Devicenet module

    Hi never used Device Net, but maybe you will find some information at the DeviceNet Master Slave Module User's Manual  
  3. Hello lennyg don't know if there is an easier way, but if you compare the project with itself via (Project | Verify) (just select the Project again as Verify Destination), the Verify List appears. Double click on the line with (Program File Match) to open the window where you can see the Instruction List.  
  4. FX3U-ENET-ADP how to connect and read strings?

    Hi hewking, don't know kepware, but found this description of the Mitsubihshi Ethernet Driver (for kepware) see page 58ff, Appendix PLC Setup for FX3U Series PLC setup, so i would suggest to try it out, but i don't know if its works with the ENET-ADP module. In difference to the ENET module the ENET ADP module (left mounterd to plc) is only providing the ethernet interface (hardware interface) and supporting the Mitshubishi MC-Protocol as described in the manual, and is primary used to enable commmunictation with other mitsubishi devices (like hmi/robot controller) using the mitsubishi MC-protocol the ADP module/ Ethernet connections can't be programmed from the plc program, but an external device using the mc-protocol can be used to fetch data from the plc so, if  the Kepware driver uses/supports the MC protocol it should work. if the kepware drivers doesn't support mc protocoll, then you will need to use a ENET module. ps: the FX Configurator software is used to configure the ENET module but not the ENET ADP module to your questions: 4.) as far as i know yes only connection at the time 5.) don't know what DSL, DSH area means, as far as i know ther isn't a special adress range used to store string, strings ares stored at hthe reigsisters/variables      that are used in the program using the ASCII character encoding, e.g. string "ABCD" stored to D10 will be stored as      D10 (16bit) : 66 (ASCII b) ,65 (ASCII a) ;      D11 (16bit):  68 (ASCII d), 67 (ASCII c)        
  5. Screen switching problem

    Hi Woszu,  i am not shure if this works, but i would try the following: 1) assign a GOT internal device to the screen switching device for the superimpose window (e.G. GD101)  you can find this setting inside the System Tab "GOT Setting\Environmental Setting\Screen Switchiwing/Window"  2) use a range trigger on your first shown base window to write the screen number of your superimpose window to the screen switching device, if the device has a zero value. (to add a screen trigger right click the base window and select Screen Trigger action...) e.g.: Screen Trigger for the first shown base Window (Screen Trigger Action) TRIGGER SETTING: Trigger Type:   Range Data Type:      Unsigned BIN16 Trigger Device: GD101 (use the Screen Switching Device) Range:          0== GD101 (Expression -> A: ==, B: none) Operation Mode: Satisfied ACTION SETTING Action:         Data Set 16bit Points:        1 Data:           Unsigned BIN16 Device:        GD101 (use the Screen Switching Device) Fixed:          1 (use the screen number of the superimpose window) hope this works  
  6. GX Works3 Projectlib Locked

    Hi FX-Zohir, you should have a look at the GX-Works 3 manual, see chapter 15.1 and 15.2 (PROTECTING DATA) if the library is protected by a password, then you have to authenticate the POU you want te edit (see page 458): Operating procedure 1. Select the POU to authenticate the block password, and click the [Authentication] button. 2. Enter the password on the "Password Authentication" screen, and click the [OK] button   if your project is secured by a key, you need to import the key-file inside the security-key-management window.(see chapter 15.2)  
  7. GOT HMI - Enable/Disable Serial Port

    Hi MarkusR, don't know if this will work but maybe you can use the Chanel Shutdown Controls GS539 to disable the corresponding chanel. The Special Registers are described inside the Screen Design Manual inside Chapter 12/GOT special registers
  8. MELSEC-L PID Control

    Hi Neverov, you can find this manual at for a list of other manuals for L-Series:    
  9. Table of Special Registers and Special Relays

    you can find several manuals for different PLC Types (Q/L/FX-serias)  at for a list of the special special register have a look at the Appendix inside the hardware design manual, eg. for Q-Series CPU see Appendix 2 and Appendix 3.    
  10. Byte to Word

    instead of shifting the bits you can use the swap instruction 1.) MOV HighByteValue  D1                 // move the High-Byte to D1 (this will be stored in the lower 8 Bit of D1) 2.) SWAP D1                                        // swap Hi/Lo of D1 (High-Byte-Value will stored in the upper 8 Bit of D1) 3.) WOR LowByteValue D1                  // OR the value of the Low-Byte of D1     
  11. FX5U Shift Dword

    Hello BL, do you really want to shift the bits of the counter in D0 or is it about reading multiple counter values and store them block by block? If you need to shift the bits of the counter (D0), this can be done with the SHL or SHR instruction, but I can't understand why you should shift bits of a counter. How many bits do you want to shift? If you need to swap high/low byte of the read counter you can use the DSWAP instruction. If you want to store multiple values (each after reading with dhcmov) you don't need a shift instruction. In this case you can the use the BMOV instruction. Alternatively you could use an index register e.g. Z1 and read the values after D0Z1.  
  12. Mitsubishi FX5 read/write from PC with nodejs

    hi david ott,   you wrote: My Test(Wrandom Write) would be as on page 133 and as I thought: new Buffer.from([0x05(subheader), 0xFF(PC No.), 0x0A, 0x00 (monitoring time in 2 parts), 0x04(number of devices?), 0x00 (fixed value),0x16, 0x4E, 0x00, 0x00 (head dev.# in 4 parts), 0x20, 0x52 (device name in 2 part), 0x00, 0x22 (input1 in 2 parts), 0x17, 0x4E, 0x00, 0x00 (head dev.# in 4 parts), 0x20, 0x52 (device name in 2 parts), 0x00, 0x40 (input2 in 2 parts), 0x18, 0x4E, 0x00, 0x00 (head dev.# in 4 parts), 0x20, 0x52 (device name in 2 parts), 0x00, 0x04(input3 in 2 parts),0x1F, 0x4E, 0x00, 0x00 (head dev.# in 4 parts), 0x20, 0x52 (device name in 2 parts), 0x00, 0x01(machineUsed in 2 parts),]);   this should be Ok except for the data values, but should write R19990- R19992 and R19999. i think for the inputvalues you have to switch the order of the High and the Low Byte: e.g. input1 = 22 (dec) = 16 (hex)  --> 0x16, 0x00 (input1 in 2 parts) input2 = 40 (dec) = 28 (hex)  --> 0x28, 0x00 (input2 in 2 parts) input3 = 04 (dec) = 04 (hex) --> 0x04, 0x00 (input3 in 2 parts) ... new Buffer.from([0x05, 0xFF, 0x0A, 0x00, 0x04, 0x00  ,0x16, 0x4E, 0x00, 0x00 , 0x20, 0x52 , 0x16, 0x00 , 0x17, 0x4E, 0x00, 0x00, 0x20, 0x52, 0x28, 0x00,  0x18, 0x4E, 0x00, 0x00 , ....   If your input is a decimal number and if you don't want to convert it to a hex number you also can use the decimal number as input for the buffer, then just leave out the "0x" at the beginning. input1 = 22 (dec) =  22, 0 (input1 in 2 parts) input2 = 40 (dec) = 40, 0 (input2 in 2 parts) input3 = 04 (dec) = 4, 0 (input3 in 2 parts) new Buffer.from([0x05, 0xFF, 0x0A, 0x00, 0x04, 0x00  ,0x16, 0x4E, 0x00, 0x00 , 0x20, 0x52 , 22, 0 , 0x17, 0x4E, 0x00, 0x00, 0x20, 0x52, 40, 0,  0x18, 0x4E, 0x00, 0x00 , ....     regarding the value 255: that was only a hint, which is about the High Byte. If the value is in the range 0-255 (dec) the high byte is 0 and the low byte is equal to the value, therefore it can be written in the buffer as [VALUE, 0] as above. For values > 255 (dez) it is easier to represent the number hexadecimal, because you can directly see the high/low byte. e.g. 16589 (dec) = 40CD(hex) => Low-Byte= 0xCD, High-Byte= 0x40        
  13. Mitsubishi FX5 read/write from PC with nodejs

    Hello David Ott, if there are only 10 registers you can of course simply write zero to the other registers (R19993-R19998) if these registers are not used in the PLC. If you do this, you should mark the registers as used/written in the device comments of the PLC, so that they are not accidentally used later. Alternatively you can use the function Test(Wrandom Write) to write only the selected registers, see page 133 in the SLMP manual In both cases the values written are 16 Bit, that mean you have to write two bytes for each value (high byte and low byte, in the order LOW, HIGH). i.e. if the value to write is <= 255 (decimal) => High-Byte= 0x00, "var writeBuffer = new Buffer.from([0x03, 0xFF, 0x0A, 0x00, 0x16, 0x4E, 0x00, 0x00, 0x20, 0x52, 0x03, 0x00, input1format, 0x00, input2format, 0x,00, input3format, 0x00]);" if the value is > 255 the corresponding high byte must be written e.g. 16.589 (dec) = 40CD(hex) => 0xCD, 0x40  
  14. Mitsubishi FX5 read/write from PC with nodejs

    hi david ott, if you receive 192, 86 (81h, 5Bh) this is the error code, because the send request is wrong, i forgot that the send buffer also need the data in high order, to receive R20000 and following register use the following send buffer: let sndBuff= new Buffer([0x01, 0xFF, 0x0A,0x00, 0x20,0x4E,0x00,0x00,  0x20,0x52,   0x09,0x00]); 0x01 ... command: batch read word units 0xFF ... pc-no 0x0A, 0x00 .... timeout (000Ah) 0x20, 0x4E, 0x00, 0x00 .... start adress (00004E20h .... = 20000) 0x20, 0x52 .... register type (5220h = R-Register) 0x09 .... number of register to read 0x00 ... endcode inside the receive function you have to convert/combine the received bytes to an 16 bit value (signed/unsigned, depending on the data type used in the plc) Therefore you can use an Int16 Array or an UInt16 Array.   client.on('data', function(data) {     let buff= Buffer.from(data);     console.log('Received: ');     console.log(buff);     const int16array = new Int16Array(         buff.buffer,         buff.byteOffset,         buff.length / Int16Array.BYTES_PER_ELEMENT);     console.log(int16array);     const uint16array = new Uint16Array(         buff.buffer,         buff.byteOffset,         buff.length / Uint16Array.BYTES_PER_ELEMENT);     console.log(uint16array);     let value1= (buff[3] << 8 ) | buff[2];     let value2= (buff[5] << 8 ) | buff[4];     console.log('value1=' + value1);     console.log('value2=' + value2);     client.end(); });  
  15. Mitsubishi FX5 read/write from PC with nodejs

    hi David Ott, the response 91,16 (5Bh, 10h) is an error code, i think this is because the request you send to plc is wrong; -> could you show me the Request you send to PLC (for binary)? for your request string "01FF000A522000004E200900" (in ASCII) this should be something like: let sndBuff= new Buffer([1,255,0,10,0,0,78,32,82,32,9,0]); client.write(sndBuffer, ()=>{                 timeout= setTimeout(()=> {                     console.debug('error: timeout occured, no data received for last ReadRequest');                     EndConnection();                 }, 1500);   be aware that the position of the device code and the head device are switched in the binary version, see page 124 in the SLMP manual