Nothing Special   »   [go: up one dir, main page]

CX3G PLC Programming Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

CX3G PLC Programming Manual

COOLMAY
CX3G PLC
Programming manual
(Differences comparing with Mitsubishi FX3G)

All right reserved by Shenzhen Coolmay Technology Co.,Ltd


V7.41
CX3G PLC Programming Manual

Content
1. Overview......................................................................................................................................................... 3
2. Soft element....................................................................................................................................................4
2.1 Soft element table.................................................................................................................................4
3. Special relay and register not supported........................................................................................................ 6
3.1 Special relay and register not supported.............................................................................................6
4. Function Instructions(Contrast with MITSUBISHI).................................................................................... 7
4.1 Applied instructions........................................................................................................................... 7
5. Application of analog.................................................................................................................................... 13
5.1 Analog input........................................................................................................................................ 13
5.1.1 Analog input type(temperature)..............................................................................................13
5.1.2 Analog input reading...............................................................................................................13
5.1.3 Analog input sampling............................................................................................................ 15
5.2 Analog output..................................................................................................................................... 16
6. Application of high speed counter................................................................................................................17
6.1 Assignment table of built-in high speed counter................................................................................17
7. Application of high speed pulse.................................................................................................................... 18
8. Coolmay CX3G PLC Communication User Manual........................................................................................19
CX3G PLC Programming Manual

1. Overview
COOLMAY CX3G PLC has the following advantages:
◆Powerful,compatible with FX3G/FX3U/FX3S PLC, high processing speed.
◆Upper computer programming software compatible with Works 2/GX Developer8.86
◆Military level 32 bit CPU adopted, which is faster and more adapted to industrial
environment of high electromagnetic interference.
◆Special encryption, prevent illegal reading thoroughly. 8-bit encryption, 12345678 as password
can thoroughly prevent reading of ladder logic program.
◆Clock supported, rechargeable battery adopted.
◆Round Rs232 for programming, Mini B-type USB programming port also adoptable.
◆2 Rs485 or 1 Rs232 and 1 Rs485 can be added, canbus optional for connecting HMI、VFD
and other equipment.
◆Support Mitsubishi programming port protocol/Modbus protocol/Rs protocol/BD board
protocol, PLC communication with each other and other devices is easily achieved.
◆At most 8 100KHz high speed pulse. Among which, regularly Y0~Y3 is 100KHz, Y4~Y7 8KHz
(100KHz can be customized).
◆At most 6 60KHz single high speed counter or 2-3 AB(Z). At most 60KHz for double frequency,
24KHz for quadruplicated frequency.
◆Support multiple types analog individually or mixed ones for analog output and input. At
most 20DI/8DO, the precision is 12 bit. Temperature/current/voltage for input. current/voltage for
output.
◆At most 40DI/40DO, relay、transistor or both relay and transistor for output
◆Convenient for wiring. 5.00 pluggable terminals adopted for convenient wiring.
◆Easy installation. DIN-Rail (35mm width) installation and fixed hole installation.
◆Flexible, can be customized accordingly.
CX3G PLC Programming Manual

2. Soft element

2.1 Soft element table


Name Contents
I/O relay
Input relay X000~X047 40points Soft element number is octal
Output relay Y000~Y047 40points Total 80points for I/O
Auxiliary relay
General M0~M383 384 points
EEPROM hold M384~M1535 1152 points
General*1 M1536~M7679*2 6144 points
Special*3 M8000~M8511 512 points
Status
Initial state (EEPROM hold) S0~S9 10 points
EEPROM hold S10~S899 890 points
Signal Alert (EEPROM hold) S900~S999 100 points
General*1 S1000~S4095 3096 points
Timer (ON delay timer)
100ms T0~T191 192 points 0.1~3,276.7s
100ms T192~T199 0.1~3,276.7s
8 points
[subprogram、break off subprogram]
10ms T200~T245 46 points 0.01~327.67s
1ms accumulative
T246~T249 4 points 0.001~32.767s
(EEPROM hold)
100ms accumulative
T250~T255 6 points 0.1~3,276.7s
(EEPROM hold)
1ms T256~T319 64 points 0.001~32.767s
Counter
General up counter (16bit) C0~C15 16 points 0~32,767 counter
EEPROM hold up counter
C16~C199 184 points 0~32,767counter
(16 bit)
C200~C219 -2,147,483,648~+2,147,483,647
General bi-direction (32 bit) 20 points
counter
EEPROM hold bi-direction C220~C234 -2,147,483,648~+2,147,483,647
15 points
(32 位) counter
High-speed counter
Single-phase single counter input C235~C245 -2,147,483,648~+2,147,483,647 Counter
Bi-direction (32 bit) (EEPROM hold) Software counter
Single-phase double counter input C246~C250 Single phase:at most 6 channel, 60kHz
Bi-direction (32 bit) (EEPROM hold) Double phase:double frequency:at most 2-3 channels,60KHz
M8198 is quad frequency sign of C251.
Double –phase double counter input C251~C255
Quad frequency:at most 2-3 channels,24kHz
Bi-direction (32 bit)(EEPROM hold)
M8199 is quad frequency sign of C253.
CX3G PLC Programming Manual

Name Contents

Data register(32 bit when using in pair)


General(16bit) D0~D127 128 points
General(16bit)*1 D1100~D7999 6900 points
EEPROM hold(16bit)
D128~D7999 D128~D7999
<file register>
Special (16 bit)*2 D8000~D8511 512 points
Index (16 bit) V0~V7,Z0~Z7 16 points
Extended register·extended file register
Extended register(16 bit)*1 R0~R23999 24000points Maintain when power off not supported
Pointer
JUMP、CALL branch P0~P2047 2048 points CJ instruct、CALL instruct
Input interrupt I0□□~I5□□ 6points
Timer interrupt I6□□~I8□□ 3points
Nest
Master control N0~N7 8points MC instruct
Constant
16 bit -32,768~+32,767
Decimal (K)
32 bit -2,147,483,648~+2,147,483,647
16 bit 0~FFFF
Hexadecimal (H)
32 bit 0~FFFFFFFF
Real number(E)*3 -1.0×2128~-1.0×2-126,0,1.0×2-126~1.0×2128
32 bit
Can be in the form of a decimal point and index
CX3G PLC Programming Manual

3 Special relay and register not supported

3.1 Special relay and register not supported


※ Special relay not supported
M8004~M8010,
M8015~M8019,
M8024~M8027,
M8030,
M8038~M8039,
M8040~M8044,
M8060~M8074,
M8084~M8119,
M8130~M8159,
M8161~M8169,
M8178~M8191,
M8256~M8339,
M8370~M8395,
M8430~M8511。

※ special register not supported


D8004~D8009,
D8042~D8067,
D8069~D8073,
D8105~D8119,
D8150~D8168,
D8200~D8329,
D8468~D8511。

Specific functions please refer to 《Mitsubishi FX3G programming manual》


CX3G PLC Programming Manual

4 Function Instructions(Contrast with MITSUBISHI)


4.1 Applied instructions【Sequence is according to instruct variety】
Applied instruction can be divided into the following 18 kinds.

1 Data move instructions 11 Program flow control instructions


2 Data conversion instructions 12 I/O refresh instructions
3 Comparison instructions 1. 13 Real time clock control instructions
4 Arithmetic operation instructions Data 14 Pulse output/positioning control
mov instructions
5 Logical operation instructions
e 15 Serial communication
6 Special function instructions
instr 16 Special block/unit control instructions
7 Rotate instructions
ucti 17 Extension register/extension file
8 Data operation instructions
ons register control instructions
9 Data operation instructions
18 Other handy instruct
10 Character string operation instructions
2. Data conversion instructions
Mnemonic FNC No. Function Support
FNC
Mnemonic Function Support
MOV 12 Move ★ No.
SMOV 13 Shift Move ★ Conversion to
BCD 18 ★
CML 14 Compliment ★ Binary Coded Decimal
BMOV 15 Block Move ★ BIN 19 Conversion to Binary ★
FMOV 16 Fill Move ★ Decimal to
GRY 170 ★
PRUN 81 Parallel Run (Octal Gray Code Conversion

Mode) Gray Code to
GBIN 171 ★
XCH 17 Exchange ★ Decimal Conversion
SWAP 147 Byte Swap ★ Conversion to
FLT 49 ★
EMOV 112 Floating Point Move ★ Floating Point
HCMOV 189 High Speed Counter Floating Point to
★ INT 129 ★
Move Integer Conversion
Floating Point to
EBCD 118 Scientific ★
Notation Conversion

Scientific Notation to
EBIN 119 Floating Point ★
Conversion
Floating Point Degree
RAD 136 to ★
Radian Conversion

Floating Point Radian to


DEG 137 ★
degree Conversion
CX3G PLC Programming Manual
3. Comparison instructions 4. Arithmetic operation instructions
Mnemonic FNC No. Function Support FNC
Mnemonic Function Support
LD= 224 Contact compare LD (S1)=(S2) ★ No.

LD> 225 Contact compare LD (S1)>(S2) ★ ADD 20 Addition ★


LD< 226 Contact compare LD (S1)<(S2) ★
SUB 21 Subtraction ★
LD<> 228 Contact compare LD (S1)≠(S2) ★
MUL 22 Multiplication ★
LD<= 229 Contact compare LD (S1)≦(S2) ★
DIV 23 Division ★
LD>= 230 Contact compare LD (S1)≧(S2) ★
EADD 120 Floating Point Addition ★
AND= 232 Contact compare AND (S1)=(S2) ★

AND> 233 Contact compare AND (S1)>(S2) ★ ESUB 121 Floating Point Subtraction ★

AND< 234 Contact compare AND (S1)<(S2) ★ EMUL 122 Floating Point Multiplication ★
AND<> 236 Contact compare AND (S1)≠(S2) ★ EDIV 123 Floating Point Division ★
AND<= 237 Contact compare AND (S1)≦(S2) ★
BK+ 192 Block Data Addition ★
AND>= 238 Contact compare AND (S1)≧(S2) ★
BK- 193 Block Data Subtraction ★
OR= 240 Contact compare OR (S1)=(S2) ★
INC 24 Increase ★
OR> 241 Contact compare OR (S1)>(S2) ★

OR< 242 Contact compare OR (S1)<(S2) ★ DEC 25 Decrement ★

OR<> 244 Contact compare OR (S1)≠(S2) ★

OR<= 245 Contact compare OR (S1)≦(S2) ★ 5. Logical operation instructions


OR>= 246 Contact compare OR (S1)≧(S2) ★ FNC
Mnemonic Function Support
CMP 10 Compare ★ No.
ZCP 11 Zone Compare ★ WAND 26 Word AND ★
ECMP 110 Floating Point Compare ★ WOR 27 Word OR ★
EZCP 111 Floating Point Zone WXOR 28 Word Exclusive OR ★

Compare

HSCS 53 High speed counter set ★ 6. Special function instructions


HSCR 54 High speed counter reset ★
FNC
HSZ 55 High Speed Counter Zone Compare ★ Mnemonic Function Support
No.
HSCT 280 High speed counter table compare ★
SQR 48 Square Root ★
BKCMP= 194 Block compare (S1)=(S2) ★
ESQR 127 Floating Point Square Root ★
BKCMP> 195 Block compare (S1)>(S2) ★
EXP 124 Floating Point Exponent ★
BKCMP< 196 Block compare (S1)<(S2) ★
LOGE 125 Floating Point Natural Logarithm ★
BKCMP<> 197 Block compare (S1)≠(S2) ★ LOG10 126 Floating Point Common Logarithm ★
BKCMP<= 198 Block compare (S1)≦(S2) ★ SIN 130 Floating Point Sine ★
BKCMP>= 199 Block compare (S1)≧(S2) ★ COS 131 Floating Point Cosine ★
TAN 132 Floating Point Tangent ★
ASIN 133 Floating Point Arc Sine ★
ACOS 134 Floating Point Arc Cosine ★
ATAN 135 Floating Point Arc Tangent ★
RND 184 Random Number Generation ★
CX3G PLC Programming Manual
7. Rotate instructions 8. Shift instructions

FNC FNC
Mnemonic Function Support Mnemonic Function Support
No. No.

ROR 30 Rotation Right ★ SFTR 34 Bit Shift Right ★

ROL 31 Rotation Left ★ SFTL 35 Bit Shift Left ★

RCR 32 Rotation right With Carry SFR 213 Bit Shift Right with Carry
★ ★

RCL 33 Rotation Left with Carry ★ SFL 214 Bit Shift Left with Carry ★

WSFR 36 Word Shift Right ★

WSFL 37 Word Shift left ★

SFWR 38 Shift Write [FIFO/FILO Control] ★

SFRD 39 Shift Read [FIFO Control] ★

POP 212 Shift Last Data Read



[FILO Control]

9. Data operation instructions

FNC
Mnemonic Function Support
No.

ZRST 40 Zone Reset ★


DECO 41 Decode ★
ENCO 42 Encode ★
MEAN 45 Mean ★
WSUM 140 Sum of Word Data ★
SUM 43 Sum of Active Bits ★
BON 44 Check Specified Bit Status ★
NEG 29 Negation ★
ENEG 128 Floating Point Negation ★
WTOB 141 WORD to BYTE ★
BTOW 142 BYTE to WORD ★
UNI 143 4-bit Linking of Word Data ★
DIS 144 4-bit Grouping of Word Data ★
CCD 84 Check Code ★
CRC 188 Cyclic Redundancy Check ★
LIMIT 256 Limit Control ★
BAND 257 Dead Band Control ★
ZONE 258 Zone control ★
SCL 259 Scaling (Coordinate by Point

Data)

SCL2 269 Scaling 2 (Coordinate by X/Y



Data)

SORT 69 Sort Tabulated Data ★


SORT2 149 Sort Tabulated Data 2 ★
CX3G PLC Programming Manual
SER 61 Search a Data Stack ★
FDEL 210 Deleting Data from Tables ★
FINS 211 Inserting Data to Tables ★

10. Character string operation instructions


FNC
Mnemonic Function Support
No.

ESTR 116 Floating Point to Character



String Conversion

EVAL 117 Character String to



Floating Point Conversion

STR 200 BIN to Character String



Conversion

VAL 201 Character String to BIN



Conversion

DABIN 260 Decimal ASCII to BIN Conversion ★


BINDA 261 BIN to Decimal ASCII Conversion ★
ASCI 82 Hexadecimal to ASCII Conversion ★
HEX 83 ASCII to Hexadecimal Conversion ★
$MOV 209 Character String Transfer ★
$+ 202 Link Character Strings ★
LEN 203 Character String Length

Detection

RIGH 204 Extracting Character String



Data From the Right

LEFT 205 Extracting Character String



Data from the Left

MIDR 206 Random Selection of Character



Strings

MIDW 207 Random Replacement of



Character Strings

INSTR 208 Character string search ★


COMRD 182 Read Device Comment Data ★
CX3G PLC Programming Manual
11. Program flow control instructions 12.I/O refresh instructions
FNC
Mnemonic Function Support FNC
No. Mnemonic Function Support
No.
CJ 00 Conditional Jump ★
REF 50 Refresh ★
CALL 01 Call Subroutine ★
REFF 51 Refresh and Filter Adjust ★
SRET 02 Subroutine Return ★
IRET 03 Interrupt Return ★ 14. Pulse output/positioning control instruction
EI 04 Enable Interrupt ★ FNC
Mnemonic Function Support
DI 05 Disable Interrupt ★ No.
FEND 06 Main Routine Program End ★ ABS 155 Absolute Current Value Read ★
FOR 08 Start a FOR/NEXT Loop ★ DSZR 150 DOG Search Zero Return ★
NEXT 09 End a FOR/NEXT Loop ★ ZRN 156 Zero Return ★
TBL 152 Batch Data Positioning Mode ★
13. Real time clock control instructions
DVIT 151 Interrupt Positioning ★
FNC DRVI 158 Drive to Increment ★
Mnemonic Function Support
No. DRVA 159 Drive to Absolute ★
TCMP 160 RTC Data Compare ★ PLSV 157 Variable Speed Pulse Output ★
TZCP 161 RTC Data Zone Compare ★ PLSY 57 Pulse Y Output ★
TADD 162 RTC Data Addition ★ PLSR 59 Acceleration/Deceleration
TSUB 163 RTC Data Subtraction

★ Setup
TRD 166 Read RTC data ★
TWR 167 Set RTC data ★ 15. Serial communication instructions
HTOS 164 Hour to Second Conversion ★
STOH 165 Second to Hour Conversion ★ FNC
Mnemonic Function Support
No.

16. Special block/unit control instructions RS 80 Serial Communication ★

R(S2) 87 Serial Communication 2 ★


FNC IVCK 270 Inverter Status Check
Mnemonic Function Support
No. IVDR 271 Inverter Drive
FROM 78 Read From a Special
IVRD 272 Inverter Parameter Read

Function Block
IVWR 273 Inverter Parameter Write
TO 79 Write To a Special
IVBWR 274 Inverter Parameter Block Write

Function Block
IVMC 275 Inverter multiple command
RD3A 176 Read form Dedicated
★ ADPRW 276 MODBUS read and write ★
Analog Block

WR3A 177 Write to Dedicated



Analog Block

RBFM 278 Divided BFM Read

WBFM 279 Divided BFM Write


CX3G PLC Programming Manual
17. Extension register/extension file register
control instructions 18. Other handy instructions

FNC FNC
Mnemonic Function Support Mnemonic Function Support
No. No.

LOADR 290 Load From ER WDT 07 Watchdog Timer Refresh ★

SAVER 291 Save to ER ALT 66 Alternate State ★

RWER 294 Rewrite to ER ANS 46 Timed Annunciator Set ★

INITR 292 Initialize R and ER ANR 47 Annunciator Reset ★

INITER 295 Initialize ER HOUR 169 Hour Meter ★

LOGR 293 Logging R and ER RAMP 67 Ramp Variable Value ★


SPD 56 Speed Detection ★
PWM 58 Pulse Width Modulation ★
DUTY 186 Timing Pulse Generation ★
PID 88 PID Control Loop ★
ZPUSH 102 Batch Store of Index

Register
ZPOP 103 Batch POP of Index

Register
TTMR 64 Teaching timer ★
STMR 65 Special timer ★
ABSD 62 Absolute Drum

Sequencer
INCD 63 Incremental Drum

Sequencer
ROTC 68 Rotary Table Control ★
IST 60 Initial state ★
MTR 52 Input Matrix ★
TKY 70 Ten Key Input ★
HKY 71 Hexadecimal Input ★
DSW 72 Digital switch

(thumbwheel input)
SEGD 73 Seven Segment Decoder ★
SEGL 74 Seven Segment With

Latch
ARWS 75 Arrow Switch ★
ASC 76 ASCII code data input ★
PR 77 Print (ASCII Code) ★
VRRD 85 Volume Read ★
VRSC 86 Volume Scale ★
CX3G PLC Programming Manual

5. Application of analog

5.1 Analog input


Input precision is 12-bit, directly read the corresponded register value of each analog while using.
Environment temperature is only used in K-type thermocouple.

5.1.1 Analog input (temperature)


Accuracy
Resoluti (whole
Input signal Range Register value
on measuring
range)
E-type thermocouple Environment Room 0.1℃ 1%
temperature ~999.9 temperature
℃ ~9999
PT100 -99.9~499.9℃ -999~4999 0.1℃ 1%
NTC10K -19.9~109.9℃ -199~1099 0.1℃ 1%
Voltage 0~10V/0-5V 0~4000 2.5mV 1%
Current Type1 0~20mA 0~4000 5uA 1%
Current Type2 4~20mA 0~4000 4uA 1%

The transmitter which is integrated inside PLC is one of the above table or mixed ones, it is up to
customers.

5.1.2 Analog input reading


Support FROM instruction or register directly read. Such as: FROM K0 K0 D400 K12, read out 12 analog
input, 0-10V.
K type thermocouple (1~4 channel) is in the 4th register from R23680, the 5th is temperature
compensation, R23684 reveals the environment temperature. The below keep the same, that is to say that
read thermocouple (6~12 channels) is the 7th register from R23685
No. Register value

AD0 R23680
AD1 R23681
AD2 R23682
AD3 R23683
Environment R23684
temperature
AD4 R23685
AD5 R23686
AD6 R23687
AD7 R23688
AD8 R23689
AD9 R23690
AD10 R23691
CX3G PLC Programming Manual

PT100 is in the 12th register from R23640

No. Register value

AD0 R23640
AD1 R23641
AD2 R23642
AD3 R23643
AD4 R23644
AD5 R23645
AD6 R23646
AD7 R23647
AD8 R23648
AD9 R23649
AD10 R23650
AD11 R23651
NTC10K is in the 12th register from R23660

No. Register value

AD0 R23660
AD1 R23661
AD2 R23662
AD3 R23663
AD4 R23664
AD5 R23665
AD6 R23666
AD7 R23667
AD8 R23668
AD9 R23669
AD10 R23670
AD11 R23671
CX3G PLC Programming Manual
0~10V/0-5V or 0~20mA in D8030~D8041(without constant scanning time)。

No. Register value

AD0 D8030
AD1 D8031
AD2 D8032
AD3 D8033
AD4 D8034
AD5 D8035
AD6 D8036
AD7 D8037
AD8 D8038
AD9 D8039
AD10 D8040
AD11 D8041
4~20mA is in the 12th register from R23620,< 3.8mA,the value is 32760,that is off line。

No. Register value

AD0 R23620
AD1 R23621
AD2 R23622
AD3 R23623
AD4 R23624
AD5 R23625
AD6 R23626
AD7 R23627
AD8 R23628
AD9 R23629
AD10 R23630
AD11 R23631

5.1.3 Analog input sampling


R23600~R23611 is filtering cycles, defaulted as 0; filtering cycles=( R23600~R23611)* PLC scanning
time, if R23600=1, sample one time each scan circle and change the 1st analog value for one time. The
larger R23600~R23611 value is, the result is more stable. D8073 is smoothing filter coefficients of all analog
input, range: 0~999.
CX3G PLC Programming Manual

5.2 Analog output


Analog output range 0~4000, precision is 12 bit. Support TO instruction or register assignment operation
directly. Adopts TO K0 K0 D500 K8, 8 channels 0~10V or 0~20mA output. register assignment operation
directly: D8050~D8057.
D8058 bit, when it equals 0, it stand for 0~10V or 0~20mA; when it equals 1, it stand for 4~20mA.

DA register Range Output type


DA0 D8050 0-4000
DA1 D8051 0-4000 When
D8058.0~D8058.7=0
DA2 D8052 0-4000
It stand for 0~10V or
DA3 D8053 0-4000 0~20mA;
DA4 D8054 0-4000
DA5 D8055 0-4000 When
DA6 D8056 0-4000 D8058.0~D8058.7=1
It stand for 4~20mA。
DA7 D8057 0-4000
CX3G PLC Programming Manual

6. Application of high speed counter

6.1 Assignment table of built-in high speed counter


Counter type Input assignment
No. X00
X000 X001 X002 X003 X004 X005 X007
6
C235 U/D
C236 U/D
C237 U/D
Single phase C238 U/D
single counter C239 U/D
input C240 U/D
C241 U/D R
C242 U/D R
C243 U/D R
C244 U/D R S
C245 U/D R S
C246 U D
C247 U D R
Single phase
C248 U D R
double counter
C248(OP)*1 U D
input
C249 U D R S
C250 U D R S
C251 A B
C252 A B R
AB phase double C253 A B R
counter input C253(OP)*1 A B
C254(OP)*1 A B
C255 A B R S

U: up counter D: down counter A: A phase input B:B phase input R: External reset input
S: External start input

Single phase: at most 6 channels, most frequency 60KHz

AB phase: Double frequency: at most 2-3 channels, most frequency 60KHz; M8198 is quadruplicated
frequency sign of C251
Quadruplicated frequency: at most 2-3 channels, most frequency 24KHz; M8199 is
quadruplicated frequency sign of C253

High speed input C254:


When M8396=0, the original C254 is AB phase corresponded to X3 X4.
When M8396=1, C254 changes to AB phase corresponded to X6 X7.
CX3G PLC Programming Manual

7. Application of high speed pulse


Coolmay CX3G default has 8 channels high speed pulse, Y0-Y3 normally each 100KHz, Y4-Y7 normally
8khz (100KHz can be customized), variable speed supported, the initial/final speed of start/stop is 0,
diagram as below: (take accelerate and decelerate time D8148 as an example). The total of 8 pulses cannot
be 240KHz.

Accelerate and decelerate time: ( target speed-current speed)* accelerate and decelerate time/highest
speed
Such as: target speed=50000, current speed=20000, acceleration time 100(ms), highest speed=100000,
T=30ms.

CX3G: 8 pulse, the latter 4 accelerate and decelerate=D8148, highest speed are all D8146L.
PLSY、PLSR、ZRN、PLSV、DRVI、DRVA、DVIT、DSZR,only Y0-Y3 support DVIT、DSZR.
Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7
Pulse M8340 M8350 M8360 M8370 M8151 M8152 M8153 M8154
operation
monitoring
Position D8340L D8350L D8360L D8370L D8140L D8142L D8144L D8160L
pulse
(32bit)

 Accelerate D834、 D8358、 D8368、 D8378、 D8148 D8148 D8148 D8148


D8349 D8359 D8369 D8379
and
decelerate
time
Pulse stop bit M8149 M8159 M8169 M8179

The original FX3G pulse program can be used directly.


CX3G PLC Programming Manual

8. Coolmay CX3G PLC Communication User Manual


CX3G PLC defaulted has a RS232 programming port, and two communication ports ( Rs232 or Rs485)

can be added. Meanwhile, CANbus is also optional.


★ Serial port1: RS232( PLC programming port)--- support Mitsubishi programming port protocol
★ Serial port 2:RS485/RS232--- support Mitsubishi BD board protocol, Rs protocol and MODBUS
protocol (Modbus RTU protocol communication parameters is set in D8120, station number set in D8121,
can be used as host and slave); The difference between Mitsubishi protocol 1 and 4 is end mark 0A 0D( in
D8124 8125), when Modbus D8120=HExxx, Modbus and former Mitsubishi function can start mark: M8125,
M8125=0: Mitsubishi BD protocol function; M8125=1: Modbus. Support RS、WR3A 、RD3A 、ADPRW.
Can also be set in parameter zone, corresponded serial port is 2. Parameter zone is only valid to this

channel setting. Set serial port 3 is void.

PLC as host, support the below functions of Modbus:

0X03: read hold register, get current binary value in one or multiple registers, range:1-32 registers

0X06: put specific binary value into a hold register( write register), range: 1

0X10: Preset multiple registers, put specific binary value into a sequence of hold register( write multiple

register), range: 1-32

Example of read slave data: RD3A D300 D400 D500

RD3A originally is a read instruction of analog module, the original instruction cannot be used. RD3A

correspond to 03# function, read register (4X). D300 stand for station number of the slave device which has

been read, range 1-247; D400 stand for the address number 0000 (Hexadecimal number) in slave devices of

data which has been read. Value in D500 stand for quantity of register which have been read, range 1-32,

the data has been read is stored in D500+1 successively.

Example of read data to slave: WR3A D300 D400 D500

WR3A originally is analog module write instruction, the original instruction cannot be used. WR3A

corresponds to 16 function of MODBUS, write data to each register(4x) of slave devices. If write only one

register, WR3A correspond to 6# function of Modbus, write one data to one register (4X) of slave device.

D300 stand for station of slave device which has been write, range 1-247; D400 stand for the initial address

number 0000 (Hexadecimal number) in slave devices of data which has been read. Value in D500 stand for

quantity of register which have been write, range 1-32.


CX3G PLC Programming Manual

★ Serial port3: RS485—support Mitsubishi programming port protocol, Rs protocol and Modbus

protocol ( communication parameters of Modbus RTU is set in D8400、station number is set in D8401, can

be used in master or slave, the same with Mitsubishi CH1).

◆ CAN—CAN adopts transparent data process, communication parameters is set in D8420, station

number set in D8421, the same with Mitsubishi CH2.


The 0th ~9th inn D8420 is CAN baud rate, 1K~1023K. Default 500.
Current support baud rate: 5 10 15 20 25 40 50 62 80 100 125 200 250 400 500 666 800 1000。

Support RS2
RS2 finial parameter=1: serial port 3;
=2:CAN。

When RS2 support CAN, multiple channels can communicate with each other, ID(read 29 bit )=D8442;ID
(write 29 bit)=D8440,at most 8 length.
LD M8000 RS2 D600 K8 D800 K8 K2
LD M8002 MOV H10 D8421
LDI M8422 ANI M8424 SET M8422
Support WR3A、RD3A,such as above data format,D499=0:serial port 2;
D499=1:serial port 3;
D499=2:CAN。
ADPRW: D8126=0(power on default) corresponds to optional serial port 2;
D8126=1 corresponds to optional serial port 1;
D8126=2 corresponds to CAN port
Such as CAN port programming of extended board:
LD M8002 MOV H1 D8421:CAN port of this PLC is main station
LD M8000 MOV K2 D8126
LD M8 ADPRW H1 H2 H2000 K16 M100
Means communication through CAN of this PLC with CAN of slave PLC, read S0~S15 of slave PLC to
M100~M115 of master PLC.
Defaulted state is compatible with the original program of Mitsubishi. Each Mitsubishi PLC can support
ADPRW for only one port, D8401、D8421 decide,D8401 priority. All three ports of Coolmay PLC support
ADPRW.
When M8192=1, the optional serial port 3 support the above protocol
When M8192=0 (power on default), the optional serial port 3 is programming port, namely
programming port protocol .

Zone bit special:


M8192(hold during power off supported)。PLC factory default M8192=0;
M8192(hold during power off supported)。PLC factory default M8192=0;

M8192=0,serial port 3 CH1 is programming port protocol;M8192=1,serial port 3CH1 is stated as above.

You might also like