Download Print this page

Delta CTA4000A Series Instruction Sheet page 11

Timer/counter/tachometer

Advertisement

End character
*CR = 10H, LF = 0AH
LRC Checksum = 2's complement of (Address + Function code + Hi byte of start address + ... )
For example: 01H + 03H + 10+ 00H + 00H + 02H = 16H, and LRC = 2's complement of 16H = EAH
RTU Mode
Register Read (03H)
Address
Function code
Start address of
read data
Word length)
CRC Low byte
CRC high byte
CRC Program Example:
i = 0; while (length--)
{ reg_crc ^= RTUData[i];
return(reg_crc);
Address & Data Register Content
4.
1000H
0
V
1001H
0
V
1002H
0
1003H
0
1004H
0
V
1005H
0
V
1006H
0
V
1007H
0
V
1008H
0
V
1009H
0
100AH
0
V
100BH
0
V
100CH
0
V
100DH
0
V
100EH
0
100FH
0
1010H
0
1011H
4
1012H
2
V
info@varitel.com - www.varitel.com - Tel. (54) 11-4243-1171 / Fax: (54) 11-4292-7545
Manuel Baliña 456, Lomas de Zamora (B1832CCJ) Buenos Aires, Argentina.
VARITEL INGENIERIA ELECTRONICA S.A.
'A'
CR
LRC Checksum
LF
End character
Response
01H
Address
03H
Function code
10H
Data length (byte)
00H
00H
Address 1000H
Data content
02H
C0H
Address 1001H
Data content
CBH
CRC Low byte
CRC high byte
unsigned int reg_crc = 0xffff;
for (j = 0; j < 8; j++)
{ if (reg_crc & 0x01)
else
Content
V
V PV1 (Low byte)
V
V PV1 (High byte)
V
PV2 (Low byte)
V
PV2 (High byte)
V
V SV1 (Low byte)
V
V SV1 (High byte)
V
V SV2 (Low byte)
V
V SV2 (High byte)
V
V Select function
V
Counter function
V
V Input type
Timer function
Timer output mode
Counting unit for timer
V
Input mode of counter
V
Dual output counting mode 0: Sum; 1: Subtract
V
Counter output mode
V
V Counting speed
V
Pulse width of output 1
'0'
'0'
End character
'3'
CR
LF
Register Write (06H)
01H
Address
03H
Function code
04H
Data address
01H
Data content
F4H
03H
CRC Low byte
20H
CRC high byte
BBH
15H
i ++;
reg_crc = (reg_crc >> 1) ^ 0xA001;
reg_crc = reg_crc >> 1;
Available on batch, total, dual counter and mixed mode
Read/write low byte (1004H) in advance is required.
Read/write low byte (1006H) in advance is required.
0: Timer; 1: Counter; 2: Tachometer; 3: Mixed function
0: 1-stage; 1: 2-stage; 2: Batch; 3: Total; 4: Dual
0: PNP; 1: NPN
0: Counting up; 1:Counting down
See Table 1 "Timer Output Mode"
See Table 1 "Timer Display"
0: Counting up; 1: Counting down; 2: Command; 3:
Individual; 4: Quadrature
See Table 1 "Counter Output Mode"
0: 1Hz; 1: 30Hz; 2: 200Hz; 3: 1kHz; 4: 5kHz; 5: 10kHz
Range: 0 ~ 9,999; Unit: 10ms, 0: Sustained mode
'D'
CR
End character
LF
Response
01H
Address
06H
Function code
10H
Data address
01H
03H
Data content
20H
DDH
CRC Low byte
E2H
CRC high byte
}
}
Remark
'D'
CR
LF
01H
06H
10H
01H
03H
20H
DDH
E2H
11

Advertisement

loading

This manual is also suitable for:

Cta4000d series