M8013 is a 1 second clock oscillation pulse, Y1 is the alarm output (flashing alarm).
M8013 is a 1 second clock oscillation pulse, Y1 is the alarm output (flashing alarm).
K1Y0=Y0 Y1 Y2 Y3
K2Y0=Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7
K3Y0=Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y10 Y11 Y12 Y13
K4Y0=Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y10 Y11 Y12 Y13 Y14 Y15 Y16 Y17
Mitsubishi inputs and outputs are due to octal, there is no 8 and 9.
Auxiliary relay M has 8 and 9, such as K4M0=M0 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 M12 M13 M14 M15
The Mitsubishi PLC constant H represents a hexadecimal number and is mainly used to indicate the operational value of the application function instruction.
K is a symbol indicating a decimal integer. It is mainly used to specify the set value of the timer or counter and the value in the operand of the application function instruction. H is a hexadecimal number, which is mainly used to indicate the operation value of the application function instruction. For example, 20 is expressed as K20 in decimal and H14 in hexadecimal.
Mitsubishi plc M: Auxiliary relay (equivalent to the intermediate relay in the electrical diagram). His control method is the same as Y, but there is no output port, just a single device. Like Y, there are coils and normally open, normally closed contacts.
When multiple control methods use the same type of Y. At this time, direct control may cross, and the program may appear complicated. At this time, you can use M to control.
For example: you have to control 5 different modes of Y0. If you control Y0 directly, it will generate a lot of interlocks (you should prevent the other 4 modes from working when you use one mode) to make the program complicated and error-prone. (At this time, you will feel that if there are 5 Y0, then how good it will be, but if you use it again, there will be double coils.) If you use 1 M coil instead of Y0 coil for each control mode. Then use the contacts of the respective M to control Y0. When M gets electricity. Y0 will also be powered. (Is it equivalent to 5 Y0)
M: FX2N series range (default) M0-M499 is a normal auxiliary relay M500–M1023 is a latch auxiliary relay (power-off retention type)
M8013 oscillates in a one-second frequency cycle, that is, it is turned on once in one second.
M8014 oscillates in a one-minute frequency cycle, that is, it is turned on once every minute.
Two fixed frequency internal relays.
ADD Addition instruction
ADD D40 D128 D130
Is to add the value of the data register D40, and the value of the data register D128, send it to D130 to save
1. In the GX-Develop (programming interface) menu, the “Display” drop-down – comment display, make sure all comments can be seen, then click on the “Device Comments” in the leftmost project bar, double-click “COMMENT” “All the uncommented X, Y, and M devices have been commented out. You can add them after you need to fill in the comments. You can see them by closing them back to the programming interface.” – This method is suitable for batch comments
2. On the programming interface menu bar, find the “Comment Edit” button, click on the double-click on the device you want to edit, and type it, but if you want to continue programming, you need to click this button again to return to the programming state.
Press X0, M0 is energized and self-locked.
At the same time, KT1 is turned on and Y0 is output. At this time, the motor is rotating 10S.
When the 10S time is up, T1 disconnects YO, and M1 is powered on and locked.
At the same time Y1 output, the motor is reversed.
KT28 seconds to the time, M0 reset, at this time a working cycle is over, automatically enter the next cycle.
Generally used in data display and data input, supporting some such as calculating and displaying the current value, setting some such as speed. Time, etc.
Inputs must be used in accordance with the application instructions, such as data comparison instructions:
CMP D0 D1 M0
How does the Mitsubishi plc implement a button press in the plc programming to start and stop again when pressed, then press again to start again
The following are two commonly used ladder diagrams
ALT is an alternate output command in the Mitsubishi PLC function instruction.
PLS is the rising edge differential output command in Mitsubishi PLC basic instructions.
How to use the INT instruction in Mitsubishi PLC, why INT 100.00=99?
INT is a floating point number to integer, 100.000=100
But your plc program is not equal to 100, it must be used in other places, so the value of D40 has changed. such as:
ALT instruction is alternate output
Assume that Y0 is the indicator light.
At this time, Y0 is off, and when X0 is pressed, the indicator lights up. Press again to turn off the light, then press it again. It’s as simple as that, it will alternate output. This can also be used as a single button to start the stop program!
Just use it when using the rising edge to achieve the alternation. If X0 does not use the rising edge, it is very likely that the PLC has actually read this switch twice.
Mitsubishi PLC master control MC input method:
When writing the MC master command, first press F8 to enter the input command format.
Then write MC space N0, space Mx press the confirm button to complete;
When the master control speed is fast, press F8 to input MCR, and the space Nx is confirmed and completed.
Note: The master command can be used seven times, from N0 to N7.
K4Y0 is 2 bytes y0-y17
K2Y0 is 1 bytes y0-y7
For example: [K85 K2Y000] Corresponds to k85 conversion binary 1010101 to the state of y0-y7.
In the Mitsubishi PLC program, it is often seen that K4M100, K7M500, K1X0, K2Y0, etc. are written.
KnM refers to consecutive 4n bits starting with M. For example, K4M100 is a continuous 4*4=16 addresses starting with M100, which means M100 to M115. These 16 bits are just the length of one word. If it is K7M500, it means 7*4=28 bits starting with M500, more than 16 bits, 32 bits of light rain, so double word instructions should be used when appearing in the program.
These are generally used to transfer instructions and compare instructions. The format used is generally as follows:
= K4M100 K0
The 16-bit contact comparison command, the M100-M115 has a total of 16 bits off, and the contact is turned on.
<> K4M100 K50
16-bit contact comparison command. When the value represented by the 16-bit word of M100-M115 is not equal to 50, the contact is turned on.
D= K7M500 K0
The 32-bit contact comparison command, the M500-M527 has a total of 28 bits off, and the contact is turned on.
MOV K0 K1Y0
16-bit transfer instruction, all of Y0-Y3 are reset.
MOV K2X0 D0
The 16-bit transfer instruction, X0-X3, a total of 8 bits representing the value is transferred to D0.
DMOV K6M50 D50
The 32-bit transfer command, the value represented by 24 bits of the M50-M523 is transferred to the D50.
CMP K1X0 K1Y0 M10
16-bit comparison instruction, the data composed of X0-X3 is compared with the data composed of Y0-Y3, the former is larger than the latter, M10=1, the former = the latter, M11=1, the former is the latter, M12= 1.
DCMP K5X0 K5M0 M100
32-bit comparison instruction, the data composed of X0-X23 is compared with the data composed of M0-M23, the former is larger than the latter, M100=1, the former = the latter, M101=1, the former is the latter, M102= 1.
L DBW [AR1, P#0.0] //Read DB100.DBW3500
S7-200 communication ports can be set to free port mode of the CPU. Freedom of choice of mode, the operation of the user program can completely control a communications port, communications protocols are completely controlled by the user program.
S7-200 communication port on the CPU in the electrical RS-485 is standard on half-duplex serial communications port. The serial character of communication formats can include
A start bit
7–or 8-bit characters (data bytes)
An odd/even parity bit, or there is no parity bit
One stop bit
Free port baud rate communication speed can be set to 1200, 2400, 4800, 9600, 19200, 38400, 57600 or 112500.
All serial communication devices conform to these formats, can in theory and S7-200 CPU communication.
Free mode you can use. Two directives Micro/WIN (USS and Modbus RTU) is to use a free port mode programmatic implementation.
Also need to be aware of are:
Free port communication in the program when debugging, you can use the PC/PPI cable (set to the free port communication mode) connect PC and CPU, serial debug software running on the PC (or Windows HyperTerminal Hyper Terminal-) debugging free program.
USB/PPI cable and the CP card free port debugging is not supported.
Free communications first communications outlet is defined as the free port mode, and set the corresponding communication baud rate and the communication format. User program through a special memory SMB30 (port 0), SMB130 (port 1) controlling communication mode.
CPU communication interface works in free mode, the communication on other communication protocols are not supported (such as PPI), this communication can no longer communicate with the programming software Micro/WIN. When the CPU is stopped, free port does not work, Micro/WIN will be able to communicate with the CPU.
Communication mode, are procedures defined by the user at run time.
If debugging needs to switch between free port and PPI mode, you can use the SM0.7 mode of the State communications and SM0.7 reflects the CPU running the switch position (at RUN time SM0.7= “1“ SM0.7= in the STOP “0“)
Core instructions are sent free port communication (XMT) and receive (RCV) instruction. In the free port of interrupted “receive instruction end interrupt“, “send orders to end interrupt“, as well as the communication port receives an interrupt.
Reading and writing instruction with the network (NetR/NetW) is similar to user programs cannot directly control the communications chips and have to go through the operating system. User programs use communications data buffers and special storage and exchange of information related to operating system.
XMT and RCV instructions similar to the data buffer, start byte for number of characters need to be sent or received, followed by a data byte itself. If a message was received which was included in the starting or ending character, they are data bytes.
XMT and RCV instruction is called simply the specified communication port and the starting byte address of the data buffer.
Also, note that:
XMT and RCV instructions NetW/NetR instructions are different, they communicate with the network “address“, and the only communication ports for local actions. If you have more than one device on your network, and must contain the address information in the message; the message containing the address information is XMT and RCV instruction processing objects.
Due to S7-200 communication port half duplex RS-485, XMT directive cannot and RCV instruction effectively.
XMT (send) instructions of use is relatively simple. RCV (receive) commands needed to control a little more.
RCV directives the basic process is as follows:
When the logical condition is met, start (a) RCV instructions into receiving a wait state
Monitoring communications port, waiting for messages set the starting condition is satisfied, then enter the message received
If you set the message of the end conditions are met, then an end message, then exit the receiving State
Therefore, RCV does not necessarily have to receive messages after the instruction starts, if not let it start message receiving conditions, has been in a State of waiting to receive if messages without beginning or end, communication has been in the receiving State. If you try to execute XMT instructions, it does not send any messages.
So make sure to both XMT and RCV very important, you can use the send and receive complete interruption of their complete feature, start another command in the interrupt routine.
In the S7-200 system manual on XMT and RCV instruction using an example. This classic, we strongly recommend learning through this example at the free port.
S7-200 CPU character interrupt function provides communications, communications receiving character will generate an interrupt, SMB2 received characters staged special memory. Communications port Port0, Port1 SMB2, but different character of two interruptions.
Each received a character, it will generate an interrupt. For sending messages in a row, you need to arrange individual character in the interrupt service routine to a user–defined message in the save area. To implement this functionality may use indirection better.
For high speed, characters interrupt requires interrupt program execution speed is fast enough.
Under normal circumstances, using the character as the end RCV instructions the end conditions are relatively reliable. If the communication object variable with one of the characters in the message frame (in bytes) end (check code), should provide news or Modbus ASCII as a condition to end RCV instructions. But often a communication object may not have strict agreements, work may not be reliable, and this may cause RCV does not end normally. This case can receive interrupt with character features.
How artificial end RCV receive status?
Command and control bytes received (SMB87/SMB187) en can be used to enable/disable receiving States. En can be set to “0“, and then perform the RCV on this port directive, end RCV instructions. (Remember, the control bytes after the assignment, RCV instruction must be executed, otherwise the receiving State does not end)
Need to communicate regularly send a message and wait for a response message, if the message is not received, the next message could not be sent to do?
Can start when a message is sent with the artificial suspension RCV instruction program.
Freedom communications, send data to the master to the slave, why received more from the station‘s chaotic response?
It shows from the station under the main station required to send messages. Has multiple communication networks from the station, from the station must be able to determine your home station message is not to own, that would require a necessary judgment function of the communication program.
Free port communication protocol is what?
By definition, no free port of the standard agreement. Users can set themselves an agreement.
New PC/PPI cable can support the free port?
New RS-232/PPI cable (6ES7 901-3CB30-0XA0) can support the free port but need to set the DIP switch 5 to “0“, and set the appropriate speed.
New USB/PPI cable (6ES7 901-3DB30-0XA0) do not support free port.
Has been used to free port communications port, can connect the operator panel (HMI)?
Known–a communications object character (byte) transport format has two stop bits, S7-200 does it support?
Character format is the most basic hardware (chips) decide; S7-200 chip does not support this format.
S7-200 supports the communication baud rate stated on the manual for the S7-200 system other than the special rate?
Communication speed is determined by the basic hardware (chips) decide; S7-200 chip does not support communication rate did not include this in the manual.
Mitsubishi MELSEC series can be divided into small and large series. Small series for the FX series maximum 256 I/O points, large series I/O points up to 8,192 points, and has a rich network of Q, QnA series and a–series. Among them, the Q–Series high performance CPU will not only have access to Q–Series modules, and are compatible with the previous a and AnS the various modules and hardware configuration. Q–Series CPU can only use the Q Series modules. Composed in PLC system, the Q Series PLC each slot can be installed any digital module, analog module, Web module, communication module.