[quote="mcu51c51"][quote="mcu51c51"]Open source plc STM32F103RBT6
STM32F103RBT6 do PLC IPC board STM32 development board simulation software source code Mitsubishi PLCFX1N
FX1N-16MR PLC program
Using ARM STM32F103 RBT6 industrial-grade chips. The latest compatible with Mitsubishi PLC programming software GX-8.86 version
Direct download software GX-8.86 version, online monitoring, program comparison, the program reads.
diy own PLC control panel, to achieve the original performance
Shorten your development time Dashboard SCM process,
Also includes online monitoring program, very easy to debug.
Open source PLC to provide you with a complete PLC program, comprising PLC schematics
8 input / 8-point output.
Mitsubishi protocol support for download, online monitoring, connect the touch screen control
M8000
M8001
M8002
M8003
M8011 10ms
M8012 100ms
M8013 1s
M8014 1min
D8000Watchdog
D8001 PLC type
D8002 Program capacity
D8003 Register Type
D8006 CPU battery voltage
D8010 Current scan time
D8011 Minimum scan time
D8012 Maximum scan time
Timer
T0--T199 100ms
T200-T245 10ms
counter
C0--C199 16Bit up counter reaches stop counting
C200--C255 32Bit counter
M0--M1500
D0--D3500
Support includes instructions
Logical instructions
1.LD enter
2.LDI Negate
3.LDP Rising input
4.LDF Enter falling
5.AND A series contacts
6.ANI Series B contact
7.ANDP Serially rising contacts
8.ANDF Falling contacts in series
9.OV A parallel contacts
10.ORIB contact parallel
11.ORP Parallel contacts rising
12.ORF Parallel falling edge contacts
13.ANB Parallel circuit block
14.ORB String loop road block
15.OUT Output contact
16.SET Set command
17.RST Reset command
18.PLS Transition instruction
19.PLF Falling instruction
20.MC Master instruction
21.MCR Master Reset
22.MPS Push instruction
23.MRD Reading instruction Stack
24.MPP Stack instruction
25.NOP No operation
26.INV Invert command
Sequence step instructions
RET End Step
Sequence Control Relay
S0--S9 The initial step
S11-S99 Working Step
Basic Instructions
Support operations such as bit length K4X0, K2Y3 and other instructions
Such as:MOV K4X0 K4M0 (This special support programs, as well suited for switching signals between the word)
Index register V0-V7 , Z0-Z7
1.CJ Jump instruction
2.FEND End of main
3.CALL Subroutine call
4.SRET Subroutine return
5.END End of program
6.FOR Cycle Start
7.NEXT Support nested loop ends
8. CMP Compare instruction
9. DCMP
9. ZCP Regional comparison instructions
10.DZCP
11.MOV Transfer Instructions
12.DMOV
13.MOVP
14.DMOVP
15.BMOV Zone transfer
16.BMOVP
17.BCD BCD conversion instruction (actual conversion into 10 into 16)
18.BIN BIN conversion instruction (actually 10 enter into turn 16)
Operational data
1.ADD Adder
2.DADD
3.SUB Subtraction
4.DSUB
5.MUL Multiplication
6.DMUL
7.DIV Division
8.DDIV
9.INC The increment instruction
10.DINC
11.DEC Decrement instructions
12.DDEC
13.AND Logical AND
14.DAND
15.OR Logical OR
16.DOR
17.XOR Logical AND OR
18.DXOR
(The program supports the shift command, you can easily respond to the needs required for shifting programming shift instruction most often used in flow control products)
1.SFTR Bit Shift Right Instruction
2.SFTRP
3.SFTL Bit Shift Left Instruction
4.SFTLP
5.SFWR Write shift register instructions
6.SFWRP
7.SFRD Read shift register instructions
8.SFRDP
9.ZRST Reset All
10.ZRSTP
11.REF import Export Refresh
12.REFP
Comparison contacts
1.LD=
2.LD>
3.LD<
4.LD<>
5.LD<=
6.LD>=
7.AND=
8.AND>
9.AND<
10.AND<>
11.AND<=
12.AND>=
13.OR=
14.OR>
15.OR<
16.OR<=
17.OR>=
============
imitation Mitsubishi FX1N PLC communication protocol C Code Demonstration program
Baud Rate: 9600
StopBits: 1, Parity: Even, DataBits: 7
Baud Rate: 9600
StopBits: 1, Parity: Even, DataBits: 7
PC : 05 // ENQ request
PLC: 06 // PLC Receive the correct response
PC : 02 30 30 45 30 32 30 32 03 36 43 // Discover PLC Type: FX1N \ FX1S
PLC: 02 36 32 36 36 03 44 37 // '6266'PLC model FX1N;' C256'PLC model FX1S.
PC : 05 // ENQ request
PLC: 06 // PLC Receive the correct response
PC : 02 45 30 30 30 31 43 30 30 31 03 44 44 // Discover PLC Current status: suspended \ Run
PLC: 02 30 41 03 37 34 // '0A'PLC pause;' 09'PLC run
PC : 05 // ENQ request
PLC: 06 // PLC Receive the correct response
PC : 02 30 30 45 30 32 30 32 03 36 43 // Discover PLC Type: FX1N \ FX1S
PLC: 02 36 32 36 36 03 44 37 // '6266'PLC model FX1N;' C256'PLC model FX1S.
PC : 05 // ENQ request
PLC: 06 // PLC Receive the correct response
PC : 02 45 30 31 38 30 30 30 32 45 03 45 38 // Discover PLC [storage] and other information
PLC: 02 30 32 30 30 44 45 43 // Currently [storage] for a 2K FX1N PLC reply
PLC: 42 30 30 30 30 30 30 30
PLC: 30 32 30 32 30 32 30 32
PLC: 30 32 30 32 30 32 30 32
PLC: 30 32 30 32 30 32 30 32
PLC: 30 32 30 32 30 32 30 32
PLC: 30 32 30 32 30 32 30 32
PLC: 30 32 30 32 30 32 30 32
PLC: 30 32 30 32 30 32 30 32
PLC: 30 32 30 32 30 32 30 32
PLC: 30 32 30 32 30 32 30 32
PLC: 30 32 30 32 30 03 44 46
PC : 02 45 30 31 38 30 32 45 32 45 03 46 46 // Why meaning is unknown query. For the time being positioned as fixed communications protocol.
PLC: 02 32 30 32 30 46 34 30 // Why unknown Reply real meaning. For the time being positioned as a fixed protocol.
PLC: 39 46 46 30 42 46 34 30
PLC: 31 45 37 30 33 36 34 30
PLC: 45 43 37 30 45 44 43 30
PLC: 45 46 46 30 45 39 30 30
PLC: 31 46 45 30 33 30 30 30
PLC: 30 30 30 30 30 30 30 30
PLC: 30 30 30 30 30 30 30 30
PLC: 30 30 30 30 30 30 30 30
PLC: 30 30 30 30 30 30 30 30
PLC: 30 30 30 30 30 30 30 30
PLC: 30 30 30 30 30 03 45 35
PC : 05 // ENQ request
PLC: 06 // PLC Receive the correct response
PC : 02 45 30 30 30 45 30 36 30 32 03 45 35 // Why meaning is unknown query. For the time being positioned as fixed communications protocol.
PLC: 02 30 38 30 30 03 43 42 // Why unknown Reply real meaning. For the time being positioned as a fixed protocol.
PC : 05 // ENQ request
PLC: 06 // PLC Receive the correct response
PC : 02 45 30 31 38 30 35 43 34 30 03 45 44 // Discover 0x805c start address data
PLC: xx xx ...
PC : 02 45 30 31 38 30 39 43 33 43 03 30 33
PLC: xx xx ...
PC : 05 // ENQ request
PLC: 06 // PLC Receive the correct response
PC : 02 45 37 37 36 30 45 03 36 31
PLC: 06 // PLC Receive the correct response
PC : 05 // ENQ request
PLC: 06 // PLCReceive the correct response
PC : 02 45 31 31 38 30 35 43 34 30 xx xx ... 03 xx xx // Start to start writing data from 0x805c address
PLC: 06 // PLC Receive the correct response
PC : 02 45 31 31 38 30 39 43 34 30 xx xx ... 03 xx xx // 0x809c Sequentially write
PLC: 06 // PLC Receive the correct response
PC : 05 // ENQ request
PLC: 06 // PLC Receive the correct response
PC : 02 45 38 37 36 30 45 03 36 32 // Why meaning is unknown query. For the time being positioned as fixed communications protocol.
PLC: 06 // PLCReceive the correct response
PC : 05 // ENQ request
PLC: 06 // PLC Receive the correct response
PC : 02 42 03 34 35 // Why meaning is unknown query. For the time being positioned as fixed communications protocol.
PLC: 06 // PLC Receive the correct response
PC : 05 // ENQ request
PLC: 06 // PLC Receive the correct response
PC : 02 45 30 31 38 30 35 43 34 30 03 45 44 // Starting from the beginning 0x805c address parity write data
PLC: xx xx ...
PC : 02 45 30 31 38 30 39 43 34 30 03 xx xx // 0x809c Followed by verification
PLC: xx xx ... // OVER the last check to complete the download
----------
[img][url=http://img.radiokot.ru/files/104583/medium/vo45n15r6.jpg][/img]
[img][url=http://img.radiokot.ru/files/104583/medium/vo45n15r6.jpg][/img]