Кто любит RISC в жизни, заходим, не стесняемся.
Ответить

Open source plc STM32F103RBT6 source code Mitsubishi PLCFX1

Чт мар 10, 2016 11:18:46

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

----------
Вложения
STM32F103RBT6 imitation Mitsubishi FX1N PLC annotated source code compiler environment for Chinese IAR 6.5.part04.rar
STM32F103RBT6 imitation Mitsubishi FX1N PLC annotated source code compiler environment for Chinese IAR 6.5
(39.28 KiB) Скачиваний: 3030
STM32F103RBT6 imitation Mitsubishi FX1N PLC annotated source code compiler environment for Chinese IAR 6.5.part03.rar
STM32F103RBT6 imitation Mitsubishi FX1N PLC annotated source code compiler environment for Chinese IAR 6.5
(400 KiB) Скачиваний: 2516
STM32F103RBT6 imitation Mitsubishi FX1N PLC annotated source code compiler environment for Chinese IAR 6.5.part02.rar
STM32F103RBT6 imitation Mitsubishi FX1N PLC annotated source code compiler environment for Chinese IAR 6.5
(400 KiB) Скачиваний: 2445
STM32F103RBT6 imitation Mitsubishi FX1N PLC annotated source code compiler environment for Chinese IAR 6.5.part01.rar
STM32F103RBT6 imitation Mitsubishi FX1N PLC annotated source code compiler environment for Chinese IAR 6.5
(400 KiB) Скачиваний: 2683

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Чт мар 10, 2016 11:21:55

Open source plc STM32F103RBT6 source code Mitsubishi PLCFX1
Вложения
STM32F103RBT6 imitation Mitsubishi FX1N PLC source code compiler environment for the IAR 6.5.part05.rar
STM32F103RBT6 imitation Mitsubishi FX1N PLC source code compiler environment for the IAR 6.5
(24 KiB) Скачиваний: 1978
STM32F103RBT6 imitation Mitsubishi FX1N PLC source code compiler environment for the IAR 6.5.part04.rar
STM32F103RBT6 imitation Mitsubishi FX1N PLC source code compiler environment for the IAR 6.5
(300 KiB) Скачиваний: 1959
STM32F103RBT6 imitation Mitsubishi FX1N PLC source code compiler environment for the IAR 6.5.part03.rar
STM32F103RBT6 imitation Mitsubishi FX1N PLC source code compiler environment for the IAR 6.5
(300 KiB) Скачиваний: 1911
STM32F103RBT6 imitation Mitsubishi FX1N PLC source code compiler environment for the IAR 6.5.part02.rar
STM32F103RBT6 imitation Mitsubishi FX1N PLC source code compiler environment for the IAR 6.5
(300 KiB) Скачиваний: 1916
STM32F103RBT6 imitation Mitsubishi FX1N PLC source code compiler environment for the IAR 6.5.part01.rar
STM32F103RBT6 imitation Mitsubishi FX1N PLC source code compiler environment for the IAR 6.5
(300 KiB) Скачиваний: 2077

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Чт мар 10, 2016 11:31:29

[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

----------
Изображение


[url=http://img.radiokot.ru/files/104583/medium/vo45n15r6.jpg]


[url=http://img.radiokot.ru/files/104583/medium/vo45mbfea.jpg]

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Чт мар 10, 2016 11:33:38

[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]

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Чт мар 10, 2016 11:40:30

[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

----------
Изображение

Изображение

Изображение

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Чт мар 10, 2016 11:52:36

[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

----------
Изображение

Изображение

Изображение

Изображение

Изображение

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Ср июн 01, 2016 12:36:27

интересно что бы это могло быть?

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Ср июн 01, 2016 13:22:20

pow бегом язык учить... :)))

А так все как обычно, вычистить от китайчатины и SPL и как образчик ардуино-писательства на STM32 сойдет...

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Чт окт 27, 2016 14:02:42

Всем доброго дня. Захотел поиграться с проектом. Перевел на keil (и chibios). На компе стоит GX Works 1.91V. Для начала попробовал сделать:

Connection Test

По описанному выше протоколу проходят (ответы не указываю)

1. PC : 05 // ENQ request
2. PC : 02 30 30 45 30 32 30 32 03 36 43 // Discover PLC Type: FX1N \ FX1S
3. PC : 05 // ENQ request

Следующая команда не проходит
4. PC : 02 45 30 30 30 31 43 30 30 31 03 44 44 // Discover PLC Current status: suspended \ Run

Вместо нее вижу строку вида
PC : 02 30 30 45 43 41 30 32 03 38 45

Что-то не так, а что не пойму. Кто-нибудь может подсказать?! Спасибо!

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Чт ноя 24, 2016 09:54:55

День добрый!
Во вложении лог обмена - правда с контроллером FX2N.
Если тема ещё актуальна - буду рад помочь, пишите.
С уважением,Михаил.
Вложения
Text1.txt
(13.64 KiB) Скачиваний: 942

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Пн ноя 28, 2016 15:44:18

Добрый день, Михаил.
Спасибо, попробую повторить (чуть познее. Конец года, запарка).
С уважением, Геннадий.

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Ср ноя 30, 2016 11:29:25

Добрый день!
Хорошо, что тема ещё жива. Я совсем забыл сказать - использую GX Developer FX v 8.78G.
Каких-либо аномалий в работе этой версии замечено не было.
А что касается повторения - вот ссылка на видео, где производится тестирование
ядра управления на плате с STM32F103C8T6 под управлением RTOS.
Так сказать, конечный результат работы, которую Вы начинаете.
А вот что касается реализации - я не использовал код, который тут выложен.
Всё пришлось проходить с самого начала.
Если будут вопросы по реализации - пишите, постараюсь помочь.

С уважением,Михаил.

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Вт янв 24, 2017 10:11:45

Добрый день, Михаил.
Праздники закончились, можно потихонечку (по мере появления времени) писать. Начало положено, благодаря Вашему логу GX Works установил подключение с платой. Теперь надо попробовать записать файл конфигурации. Могли бы Вы сделать лог на запись программы ниже ?

LD X0
OUT Y0
END

Спасибо, С уважением Геннадий.

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Ср янв 25, 2017 18:08:42

День добрый!
Запрошенный лог записи в аттаче.
Я кстати хоть и реализовал интерпретатор ладдерной( и не только) логики контроллера FX2N Mitsubishi для микроконтроллеров серии STM32, сам контроллер даже в глаза не видел - только на картинках.
Вложения
writeX0-Y0.txt
Искомый лог обмена по СОМ порту
(55.44 KiB) Скачиваний: 883

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Чт янв 26, 2017 06:19:21

Доброе утро, Михаил.
Если б знать протокол обмена... А я в глаза PLC FX не видел. Делаю для сына, хочу его заинтересовать, оторвать от телефона и т.д.

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Пт янв 27, 2017 11:56:53

День добрый, Геннадий.
Для меня оторвать от телефона и наставить на путь джедая это святое!
Одна из целей моей длительной работы как раз и было - создать недорогое и интересное для изучения устройство.
Выбрал вот такую плату - это не ардуино, и намного дешевле некоторых из них.
Ниже под спойлером фото такой платы.

Поддержка почти всех команд контроллера FX2N, плюс добавлены шина 1-wire и modbus RTU master - slave.
Также есть 2 канала для управления шаговыми двигателями до 25 кГц.
Уже на этом можно строить очень интересные системы - от светофоров до небольших роботов. И самое главное - юное поколение
будет уже сразу учиться работе на языке стандарта IEC-61131-3, понимать, что с чем связано.
Когда я исследовал наличие чего-то подобного, то не нашёл. Arduino IDE, FlProg - это все достаточно далеко от IEC61131, потому что там нет возможности онлайн- отладки, полноценной выгрузки программ, онлайн-модификации переменных и многого другого.
Конечно, плюсом к FlProg идёт поддержка просто колоссального количества внешних устройств - я себе такое позволить не могу, потому что мои драйвера отточены под операционную систему реального времени и уже встроены в прошивку.
Также в аттаче можно найти схему принципиальную устройства, изображённого на рисунке.
Для избежания рекламы всем желающим попробовать устройство в деле я скину ссылку в личку - пишите, буду рад.
P.S. Такая плата на алиэкспресс ищется как STM32 minimum board
Вложения
STM32_Min_System_Dev_Board.pdf
(21.43 KiB) Скачиваний: 1712

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Чт фев 02, 2017 11:50:59

День добрый,Геннадий!
Вот искомый лог - только я не работаю с GX Works2, использую GX Developer FX.
Но всё равно - запись общения в логе.
Для меня всегда были поразительны те люди, которые вот так берутся за тяжёлые проекты!
Именно они и толкают прогресс вперед.
Вложения
Load_GX_Works2.zip
(8.22 KiB) Скачиваний: 1149

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Пн сен 18, 2017 23:24:03

Всем доброго времени суток. Думал немного поиграться с этим проектом,но.. Проект компилируется с ошибками... прошивал готовым биновским файлом и хексом что в проекте есть, у меня STM32F103RCT6 ,не могу подключиться к среде. по ком порту нет связи. Думал сыну дать поучить IEC-61131-3 ,а что-то не выходит... Гуру отзовитесь,кто запускал, среда GX Developer FX.

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Вт сен 19, 2017 13:24:44

Проект компилируется с ошибками...

попробовал проект откомпилировать для STM32F103RB в IAR 8.11.1 - там ошибки такие:
в uart.c комментарий неправильный, так поправить:
/* The second communication port communication parameters update function */

в plc.c так поправить:
// System-level parameter read
после правки компилируется без ошибок и для STM32F103RCT6

Re: Open source plc STM32F103RBT6 source code Mitsubishi PL

Вт сен 19, 2017 21:58:39

Мда... По ночам сидеть ,плохо... Действительно комментарии не правильно оформлены... Как так ? Но дело не поменялось. Все скомпелировалось,залил bin переключил boot. Не конектица Developer FX ... При включении контроллера на выходах так называемого PLC логические единицы, по идеи так и должно быть,судя по схеме они еще инвертируются. Но связи нет... Кто запускал этот проект,дайте пинка в нужном направлении. Спасибо.

Добавлено after 3 minutes 58 seconds:
Re: Open source plc STM32F103RBT6 source code Mitsubishi PLCFX1
Может я как-то не правильно в контроллер заливаю ? По другим адресам нужно ? и еще, у меня eeprom не подключенная...
Ответить