WJ66 - Machine Translated
WJ66 - Machine Translated
Encoder pulse counter, angular velocity displacement measurement, Modbus RTU module WJ66
Encoder pulse counter, angular velocity displacement measurement, Modbus RTU module WJ66
Features:
• Supports 4 encoders counting simultaneously and can identify forward and reverse rotations
• Built-in 8 DOs can be used as encoder upper and lower limit alarm outputs
• Users can programmably set the module address, baud rate, etc.
typical application:
• Motor speed measurement and control Figure 1 WJ66 module appearance diagram
product description:
The WJ66 product realizes signal acquisition between the sensor and the host, and is used to decode the encoder signal and control the device. WJ66 series products can be used in
RS-232/485 bus industrial automation control system, automated machine tools, industrial robots, three-coordinate positioning system, displacement measurement, stroke measurement, angle
Products include pulse signal capture, signal conversion and RS-485 serial communications. Each serial port can connect up to 255 WJ66 series modules. The communication method
Adopting ASCII code communication protocol or MODBUS RTU communication protocol, the baud rate can be set by code, and can be hung on the same platform as control modules from other manufacturers.
WJ66 series products are intelligent monitoring and control systems based on microcontrollers. All user-set addresses, baud rates, data formats, checksums
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
WJ66 series products are designed and manufactured according to industrial standards, with strong anti-interference ability and high reliability. Working temperature range - 45ÿÿ+85ÿ.
Function introduction:
The WJ66 remote I/O module can be used to measure four encoder signals and has eight switching outputs. Can be used as 4-channel encoder counter or 4-channel speed
4 channels of encoder signal input, which can be connected to dry contacts and wet contacts. Please refer to the wiring diagram for details; 8 channels of switch signal output are open collector outputs.
2. Communication protocol
Communication interface: 1-way standard RS-485 communication interface or 1-way standard RS-232 communication interface, please indicate when ordering and selecting.
Communication protocol: Supports two protocols, the character protocol defined by the command set and the MODBUS RTU communication protocol. The module automatically identifies the communication protocol,
It can realize network communication with various brands of PLC, RTU or computer monitoring systems.
Communication address (0~255) and baud rate (2400, 4800, 9600, 19200, 38400, 57600, 115200bps) can be set; communication
The maximum distance of the network is up to 1200 meters, connected through twisted pair shielded cables.
The communication interface has high anti-interference design, ±15KV ESD protection, and communication response time is less
Checksums can be set as needed. There is a transient suppression diode inside the module, which can effectively suppress various surge pulses and protect the module.
Word filtering can also effectively suppress power frequency interference from the power grid.
product model:
WJ66 - ÿ
Communication Interface
Selection example 1: Model: WJ66 -232 means the output is RS-232 interface
Selection example 2: Model: WJ66 -485 means the output is RS-485 interface
Low level: Input < 1V; High level: Input 3.5 ~ 30V Frequency range 0-50KHz
type: Open collector output, voltage 0~30V, maximum load current 30mA, 8 channels (DO0~DO7).
Communication: Protocol RS-485 or RS-232 standard character protocol and MODBUS RTU communication protocol
Baud rate (2400, 4800, 9600, 19200, 38400, 57600, 115200bps) can be selected by software
Maximum working power supply: +8 ~ 32VDC Wide power supply range, internal anti-reverse connection and
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
Pin definition:
1 DO7 channel 7 switching signal output terminal 11 DO1 channel 1 switching signal output terminal
2 DO6 channel 6 switching signal output terminal 12 DO0 channel 0 switching signal output terminal
3 DO5 channel 5 switching signal output terminal 13 A0 Encoder 0 signal A input terminal
4 DO4 channel 4 switching signal output terminal 14 B0 Encoder 0 signal B input terminal
5 DO3 channel 3 switching signal output terminal 15 A1 Encoder 1 signal A input terminal
6 DO2 channel 2 switching signal output terminal 16 B1 Encoder 1 signal B input terminal
10 GND Negative terminal of power supply, signal ground 20 B3 Encoder 3 signal B input terminal table 1 pin
definition
Encoder 2 Lower limit alarm output port code Device 3 lower limit alarm output port DO7
Modbus
Encoder pulse counter, angular velocity displacement measurement, RTU module WJ66
The internal pull-up resistor needs to be turned on, and the 40082 register is set toThe internal pull-up resistor needs to be turned off, and the 40082 register is set to 0.
1, or send the character command $01Q1X Or send the character command $01Q0X
The internal pull-up resistor needs to be turned off, and the 40082 register is set to The internal pull-up resistor needs to be turned off, and the 40082 register is set to 0.
0, or send the character command $01Q0X Or send the character command $01Q0X
The external power supply can be selected from The output high level is equal to the supply voltage
5 ~ 30VDC, or it can be the power supply for the module. It is necessary to turn on the internal pull-up resistor, set the 40083 register to 1, or send
The operating current of the transistor is less Send character command $01QX1.
than 30mA. The internal pull-up resistor needs to be turned off, and the 40083 register is set to 0, or
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
checksum is disabled. If the RS-485 network is used, a unique address code must be assigned. The address code value is a hexadecimal number between 00 and between FF,
Since the address codes of new modules are all the same, their addresses will conflict with other modules, so when you build the system, you must reconfigure each
A WJ66 module address. After connecting the WJ66 module power cord and RS485 communication line, you can modify the address of the WJ66 module through configuration commands.
The baud rate, checksum status also need to be adjusted according to the user's requirements. Before modifying the baud rate and checksum status, the module must first enter the default setting.
There is an INIT switch on the side of the WJ66 module, located on the side of the module. Turn the INIT switch to the INIT position and then turn on the power.
The module enters the default state. In this state, the module is configured as follows:
is disabled. At this time, the baud rate, checksum status and other parameters of the WJ66 module can be modified through configuration commands. When you are unsure about the specific configuration of a m
You can also turn the INIT switch to the INIT position to put the module into the default state, and then reconfigure the module.
Note: During normal use, please turn the INIT switch to the NORMAL position.
The character protocol command consists of a series of characters, such as a prefix, address ID, variables, optional checksum bytes, and a command end character (cr) used to display the command.
The host can only command one WJ66 module at a time, except for the synchronization command with the wildcard address "**".
(Leading code) The leading code is the first letter in the command. All commands require a command prefix, such as %, $, #, @,... etc. 1- character
(Addr) Module address code, if not specified below, the value range is from 00 to FF (hexadecimal). 2- characters
(Command) displays the command code or variable value. Variable length [data] Some data required by the output command. variable length
[checksum] The Checksum (checksum) in brackets shows an optional parameter and is only required when checksum is enabled. 2- A control code character used for character
(cr) recognition, (cr) is used as the carriage return terminator, and its value is 0x0D. 1- character
[Checksum] is required when checksum is enabled. It takes up 2-characters. Both commands and responses must have a checksum attribute attached. Checksum
Used to check all input commands to help you find host-to-module command errors and module-to-host response errors. The checksum character is placed in the command or
After the response character and before the carriage return character.
Calculation method: two characters, a hexadecimal number, which is the sum of the ASCII code values of all previously sent characters, and then ANDed with the hexadecimal number 0xFF.
Response to command:
The response message depends on various commands. The response also consists of several characters, including the first code, variables and end identifier. The first part of the response signal
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
There are two types of codes, '!' or '>' represents a valid command and '?' represents an invalid command. By checking the response information, you can monitor whether the command is valid
Note: 1. In some cases, many commands use the same command format. Make sure you use the correct address in a command. If you use the wrong
If the address is wrong, and this address represents another module, then the command will take effect in the other module, so an error occurs.
3. (cr) represents the carriage return character on the keyboard. Do not write it directly. You should press the Enter key (Enter key).
Description: Read back all output channel switching status, switching reset status and encoder input channel switching status from the module.
module address, the value range is 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
AAAAAAAA, which represents the read output switch status, 8 numbers, and the order is DO7~DO0.
The value is 0: the output transistor is disconnected; the value is 1: the output transistor is connected
BBBBBBBB represents the read output switch status after reset, 8 numbers, the order is DO7~DO0, a value of 0: the
CCCCCCCC represents the read encoder input switch status, 8 numbers, the order is B3A3 B2A2 B1A1 B0A0, the value is 0: input low level; the
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
switch status is 00011000, and the arrangement sequence is DO7~DO0 Channel 0: Transistor is
disconnected Channel 1: Transistor off Channel 2: Transistor off Channel 3: Transistor on Channel 4: Transistor on Channel 5: Transistor
After the module is reset, the output switch state is 00001010, and the order is DO7~DO0
Channel 0: Transistor is off Channel 1: Transistor is on Channel 2: Transistor is off Channel 3: Transistor is on Channel 4: Transistor is
off Channel 5: Transistor is off Open Channel 6: Transistor is disconnected Channel 7: Transistor is disconnected
A2: low level B2: low level A3: low level B3: low level
Description: Set the transistor status of all output channels. The factory setting for all channels is 00000000.
module address, the value range is 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
AB channel selection, you can select all output channels or a single output channel.
Set output: Set AB to 00, which means setting all output channels. If setting for a single channel, the character A
Must be set to 1, character B can be set to 0-7, representing 8 triode DO output channels.
Set reset output: Setting AB to FF means setting the reset output value of all channels. For example, if the reset output of a single channel is
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
Line setting, then character A must be set to E, character B can be set to 0-7, representing 8 transistor DO output channels.
CD output value.
and D stands for channel 3~0. DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0
Bit value is 0: Bit7 Bit 6 Bit 5 Bit 4 Bit 3 Bit2 Bit 1 Bit 0
Bit value is 1:
2. If it is set for a single channel (AB=1X or AB=EX, X represents the channel to be set), it can only be set to 00 or 01.
on (cr). The end character is the enter key of the host computer. The hexadecimal value is 0DH.
is: Channel 0: Transistor on Channel 1: Transistor on Channel 2: Transistor on Channel 3: Transistor on Channel 4: Transistor off Channel 5:
Description: Set the reset output of all channels (AB=FF) to FFH, which converted to binary is 1111 1111.
Then after the module is reset, the transistors of all channels are turned on.
Description: To read the data of the encoder counter, you can read all encoders or a single encoder. '+' means forward rotation, '-' means reverse rotation.
AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Response format: !+AAAAAAAAA, +AAAAAAAAAA, +AAAAAAAAAA, +AAAAAAAAAA (cr) Command format: #AA2N(cr)
AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
(character format) !+0012345678, +0012345678, +0012345678, +0012345678 (cr) Description: All encoders The count value is forward
+12345678.
Description: Read the input frequency, you can read all encoders, or you can read a single encoder. '+' means forward rotation, '-' means reverse rotation.
AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
(character format) !+001000.00,+001000.00,+001000.00,+001000.00 (cr) Description: All The input frequency value of the
Description: To read the output PWM, you can read all channels, you can also read a single channel, and you can also read the reset PWM
value. Command format: #AA4(cr) Read the PWM value of channel 0~channel 7
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Response format: ! AAA.AA, AAA.AA, AAA.AA, AAA.AA, AAA.AA, AAA.AA, AAA.AA, AAA.AA(cr) Command format: #AA4S(cr) Read channel
Response format: ! AAA.AA, AAA.AA, AAA.AA, AAA.AA, AAA.AA, AAA.AA, AAA.AA, AAA.AA(cr) Command format: #AA4N(cr) Read channel
N PWM value
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
channel 0 is 50%.
Note: When setting the output PWM value or setting the reset PWM value, only a single channel can be set. The factory setting for all channels is 050.00.
Command format: #AA5NAAA.AA(cr) Set the PWM value of channel N. Parameter description:
AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
AAA.AA sets the output PWM value, the value range is 000.00~100.00
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Description: Read the output PWM frequency, and you can also read the reset PWM frequency.
description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Response format: ! AAAAA, BBBBB (cr) AAAAA represents the frequency of channels 0~3, BBBBB represents the frequency of channels 4~7 Command
Response format: ! AAAAA, BBBBB (cr) AAAAA represents the reset frequency of channels 0~3, BBBBB represents the reset frequency of channels 4~7 Application
example 1: User command (character format) #016 (cr) module response (character
frequency of channels 0~3 is 100Hz, and the PWM reset frequency of channels 4~7 is 200Hz.
Note: When setting the output PWM frequency or setting the reset PWM frequency, only a single channel can be set. Range 00000~65535, set to 00000
Indicates that the PWM output is turned off and the output is a switching level output. The factory setting for all channels is 00000.
Command format: #AA7NAAAAA(cr) N=0 means to set the PWM frequency of channels 0~3, N=1 means to set the PWM frequency of channels 4~7. Parameter description:
AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
Command format: #AA7SNAAAAAA(cr) N=0 means setting the PWM reset frequency of channels 0~3.
Description: Read the input speed, you can read all encoders, or you can read a single encoder. '+' means forward rotation, '-' means reverse rotation. Command
format: #AA8
AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Application example 1: User command (character format) #018 (cr) Module response
(character format) !+01000,+01000,+01000,+01000 (cr) Description: All encoders The input speed
Description: Modify the value of the encoder counter, or set it to zero and start counting again. The alarm will be cleared automatically after modifying the count value.
Command format: $AA1N+AAAAAAAAAA(cr) Modify the count value of encoder N. N is the encoder code. When N is set to 'A', it means
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Application example 2: User command (character format) $011A+0000000000(cr) Module response (character
format) ! 01(cr)
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
Application example 3: User command (character format) $011A+0000003000(cr) Module response (character
Description: Set whether the PWM output should be output after inverting the high and low levels. The factory setting is 00000000.
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Parameter description: BBBBBBBB represents the switch status, 8 numbers, the order is DO7~DO0
The value is 0: the PWM of this channel is normal output; the value is 1: the PWM of this channel is inverted output.
normal output.
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Response format: ! BBBBBBBB (cr) indicates whether the PWM output is set to inversion
Parameter description: BBBBBBBB represents the switch status, 8 numbers, the order is DO7~DO0
The value is 0: the PWM of this channel is normal output; the value is 1: the PWM of this channel is inverted output.
Description: Set the number of pulses per revolution of the encoder. Set according to the connected encoder parameters. The factory default value is 1000. Set the correct number of pulses.
Command format: $AA5NAAAAA (cr) Set the number of pulses per revolution of the encoder.
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
AAAAA represents the number of pulses, such as 1000, 800 or 600, etc.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Application example: User command (character format) $015100300 (cr) Module response
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
Command format: $AA6(cr) Read the number of pulses per revolution of all encoders, arranged in order 0~3.
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Response format:! AAAAA, AAAAA, AAAAA, AAAAA (cr) indicates the number of pulses per revolution of encoder 0~encoder 3.
Application example: User command (character format) $016 (cr) Module response
(character format) ! 01000, 01000, 01000, 01000 (cr) Note: The number of pulses per revolution of
Command format: $AA7NAA (cr) Set the working mode of the encoder.
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
AA stands for working mode. The range is 00~05. In alarm mode, DO is used as a switch alarm output and cannot be used as PWM output.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Command format: $AA8(cr) Read the working modes of all encoders, arranged in order 0~3.
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Response format: ! AA, AA, AA, AA (cr) indicates the working mode of encoder 0~encoder 3.
Application example: User command (character format) $018 (cr) Module response
(character format) ! 03, 03, 03, 03 (cr) Description: All encoders are in upper
17. Set the upper limit alarm value and lower limit alarm value of the encoder
Description: Set the upper limit alarm value and lower limit alarm value of the encoder, and activate the alarm according to different working modes.
Command format: $AASN+ AAAAAAAAAA,+BBBBBBBBBB (cr) Set the upper limit alarm value and lower limit alarm value of the encoder.
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Set encoder 0 as the upper limit alarm value is 1234567890, and the lower limit alarm value is -12345.
Description: Set the encoder alarm time command. Alarm time, the default value is 0, which means that both the alarm signal and the counter need to be cleared by instructions issued by the host computer.
remove. If it is another value, multiply it by 0.01 seconds to get the actual continuous alarm time. After reaching the alarm time, the alarm signal will automatically
Command format: $AATNAAAA,BBBBB (cr) Set the upper limit alarm time and lower limit alarm time of the encoder.
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
the upper limit alarm time of 50 seconds and the lower limit alarm time of 20 seconds.
19. Read the upper limit alarm value, lower limit alarm value and alarm time of the encoder
Description: Read the upper limit alarm value, lower limit alarm value and alarm time of the specified encoder.
Command format: $AAR(cr) Read the alarm time of all encoders, the upper limit is 0~3, the lower limit is 0~3.
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Entertainment:! +AAAAAAAAAA, +AAAAAAAAAA, +AAAAAAAAAA, +AAAAAAAAAA, +BBBBBBBBBB, +BBBBBBBBBB, +BBBBBBBBBB, +BBBBBBBBBB, CCCCC,
response (character format) ! +0000012345, +0000012345, +0000012345, +0000012345, -0000002000, -0000002000, -0000002000, -000000200 0,03000,
03000, 03000, 03000,03000, 03000, 03000, 03000 (cr) Description: The upper limit alarm value of all encoders is +12345, and the lower limit alarm
value is -2000.
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
20. Set whether the encoder count value is automatically saved when the power is off.
Description: Set whether the count value of the encoder is automatically saved when the power is turned off. The factory default value is 1 (automatically saved when the power is turned off).
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
X Set whether the encoder's count value is automatically saved when the power is turned off.
W 0: No automatic saving, reset when power is off; 1: Automatically save the encoder count value when power is off.
Set the encoder not to save the count value, and the count will be automatically cleared after power failure.
Description: Set the pull-up switches of DI and DO. The factory default value is 00 (both DI and DO turn off the pull-up function).
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
X 0: DI turns off the pull-up voltage; 1: DI turns on the pull-up voltage. X: Keep the original settings.
Y 0: DO turns off the pull-up voltage; 1: DO turns on the pull-up voltage. X: Keep the original settings.
to turn on the pull-up voltage. When DI is an NPN input, it can be set to turn on the DI pull-up voltage.
When DO needs voltage output, you can set the DO pull-up voltage to be turned on.
22. Set all parameters set by the above character command to restore to factory settings.
Description: Set the parameters set by the module using the above character command to restore to factory settings. After completion, the module will automatically restart.
Parameter description: AA module address, value range 00~FF (hexadecimal). The factory address is 01, converted to hexadecimal as ASCII for each character
code. For example, address 01 is converted into hexadecimal 30H and 31H.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Response format: ! AA(cr) means the setting is successful and the module will automatically restart.
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
Description: Set address, baud rate, checksum status for a WJ66 module. Configuration information is stored in non-volatile memory EEPROM.
NN represents the hexadecimal address of the new module, and the value NN ranges from 00 to FF.
TT represents the type code in hexadecimal. WJ66 products must be set to 00.
04 2400 baud
05 4800 baud
06 9600 baud
07 19200 baud
08 38400 baud
09 57600 baud
0A 115200 baud
FF uses 8 hexadecimal digits to represent the data format and checksum. Note that bits2 to bits5 do not have to be set to zero.
The ?AA(cr) command is invalid or illegal, or the configuration jumper is not installed before changing the baud rate or checksum.
(cr) Terminator, the carriage return key of the host computer, the hexadecimal value is 0DH.
Other notes: If you configure the module for the first time, AA=00, NN equals the new address. If the module is reconfigured to change the address, input range, number
According to the format, AA equals the currently configured address and NN equals the current or new address. If you want to reconfigure the module to change the baud rate
or checksum status, you must install the configuration jumper to make the module enter the default status. At this time, the module address is 00H, that is, AA=00H.
If there is a format error or communication error or the address does not exist, the
Description: % delimiter.
00 means that the original address of the WJ66 module you want to configure is 00H.
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
00 indicates that the data format is engineering units and checksums are disabled.
configuration status command (cr), the host computer's Enter key, and the hexadecimal value is 0DH.
Other instructions: If there is a format error or communication error or the address does not exist, the module will not respond.
Description: ! delimiter.
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
Modbus address is 01
There is an INIT switch on the side of the WJ66 module, located on the side of the module. Turn the INIT switch to the INIT position and then turn on the power.
The block enters the default state. In this state, the module temporarily returns to the default state: address 01, baud rate 9600. When unsure about a module
During specific configuration, the user can query the address and baud rate registers 40201-40202 to obtain the actual address and baud rate of the module, or as needed
Note: During normal use, please turn the INIT switch to the NORMAL position.
Supports Modbus RTU communication protocol, and the command format follows the standard Modbus RTU communication protocol.
01 Read Coil Status reads coil status 1 means high level, 0 means low level.
03 Read Holding Register Read Holding Register Write Single 1 means high level, 0 means low level.
05 Write Single Coil Coil 1 means the transistor is on, 0 means the transistor is off.
06 Write Single Register Write a single register 1 means the transistor is on, 0 means the transistor is off.
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
function codes 01, 05 and 15. Address (PC, DCS) Data content Attribute data description
00009 8 Output switching value read/write Reset output status of channels 0~7
00011 10 Output switching value read/write 0 means the transistor is disconnected after reset.
00012 11 Output switching value read/write 1 means the transistor is turned on after reset
00033 32 A0 input switch value is read-only Level status of encoder input point
00035 34 The switching value of A1 input is read-only 1 means high level input
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
DCS) of function codes 03, 06 and 16 data content Attribute data description
40003 2 PWM2
40009 8 Channel 0~3 pulse frequency read/write Output PWM pulse frequency, (default value is 0)
40010 9 Channel 4~7 pulse frequency read/write Integer, range 0 ~ 65535 Hz. Set to 0,
40019~40020 18~19 Encoder 1 Counting read/write The data is a signed long integer in hexadecimal format.
40021~40022 20~21 Encoder 2 Counting read/write Negative numbers use two's complement,
Alarm, the alarm will be cleared automatically after modifying the count value.
Writing other values has no effect and does not clear the encoder. if
If there is an alarm, the alarm will be cleared automatically after clearing the count value.
40029 28 Read/write the pulse number of encoder 0 unsigned integer (factory default is 1000), root
40030 29 Encoder 1 pulse number read/write Set according to the number of pulses per revolution of the encoder. After setting, send
40031 30 Encoder 2 pulse number reading/writing Registers 40101~40104 are the conversion of the corresponding channels.
40035 34 Encoder 2 working mode read/write 0x0001, upper limit alarm mode
40036 35 Encoder 3 working mode read/write 0x0002, lower limit alarm mode
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
Address 4X (PLC) Address (PC, DCS) Data content Attribute data description
40041~40042 40~41 Encoder 0 upper limit value read/write Encoder 0~3 upper limit alarm value and lower limit alarm value,
40043~40044 42~43 Encoder 1 upper limit value read/write The default value is 0.
40045~40046 44~45 Encoder 2 upper limit value read/write The data is a signed long integer in hexadecimal format.
40047~40048 46~47 Encoder 3 upper limit value read/write Negative numbers use two's complement,
40049~40050 48~49 Encoder 0 lower limit value read/write Positive number (0x00000000~0x7FFFFFFF),
40051~40052 50~51 Encoder 1 lower limit value read/write Negative number (0xFFFFFFFF~0x80000001),
40057 56 Encoder 0 upper limit time read/write Unsigned integer, range 0x0000-0xFFFF alarm
40058 57 Encoder 1 upper limit time read/write time, default value is 0, indicating alarm signal
40059 58 Encoder 2 upper limit time read/write Both the host computer and the counter need to modify the counter pointer.
40060 59 Encoder 3 upper limit time read/write Order to clear. If it is another value, multiply by 0.01
40061 60 Encoder 0 lower limit time read/write Seconds later is the actual duration of the alarm time. arrival report
40062 61 Encoder 1 lower limit time read/write After the alarm time, the alarm signal will be automatically cleared and the code
40063 62 The count value of the device will also be automatically cleared.
Encoder 2 lower limit time read/write
40065 64 PWM0 reset output value read/write Channel 0~7 PWM reset output value,
40073 72 Channel 0~3 frequency reset value read/write Pulse frequency reset output value, (default value is 0)
40074 73 Channel 4~7 frequency reset value read/write Integer, range 0 ~ 65535 Hz. Set to 0,
40081 80 The encoder count value is automatically maintained Read/write 0: No automatic saving, reset when power off;
live 1: Automatically save the encoder count value when power is off. (default
value is 1)
40082 81 DI's pull-up switch reads/writes 0: DI turns off the pull-up voltage; (default value is 0)
40083 82 DO's pull-up switch reads/writes 0: DO turns off the pull-up voltage; (default value is 0)
40089 88 The parameters are restored to factory settings and the read/write setting is FF00, then the parameters of all registers of the module
Restore to factory settings, the module will automatically restart after completion
40101 100 The speed of encoder 0 is read-only Signed integers, positive and negative represent positive and negative inversions.
40102 101 The speed of encoder 1 is read-only The speed is set according to registers 40029~40032
40103 102 Encoder 2 speed read-only It is obtained by converting the number of pulses.
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
Address 4X (PLC) Address (PC, DCS) Data content Attribute data description
40129~40130 128~129 Encoder 0 frequency read only 32-bit floating point number, the collected frequency.
40131~40132 130~131 Encoder 1 frequency read only The storage order is CDAB.
40201 200 Module Read/write integer, effective after restart, range 0x0000-0x00FF
40202 201 address baud rate Read/write integer, effective after restart, range 0x0004-0x000A
= 9600 bpsÿ
= 38400 bpsÿ
Communication example 1: If the module address is 01, send it in hexadecimal: 010300000001840A to obtain the register data.
01 03 00 00 00 01 84 0A
Module address read holding register register address high register address low register number high register number low CRC check low CRC check high
If the module replies: 0103020333F8A1 , the read data is 0x0333, which is converted to decimal 819, which means the current PWM output of channel 0
is 8.19%.
01 03 02 03 33 F8 A1
Module address read holding register data byte number data high bit data low bit CRC check low bit CRC check high bit
Communication example 2: If the module address is 01, send it in hexadecimal: 010300100002C5CE to obtain the register data.
01 03 00 10 00 02 C5 THIS
Module address read holding register register address high register address low register number high register number low CRC check low CRC check high
If the module replies: 010304CA90FFFFC476 , the read data is 0XFFFFCA90, which is -13680 in decimal, which means the current encoding
01 03 04 THAT 90 FF FF C4 76
Module address read holding register data byte number data 1 high-bit data 1 low-bit data 2 high-bit data 2 low-bit CRC check low-bit CRC check high-bit
Communication example 3: If the module address is 01, send it in hexadecimal: 0106001A000A280A , which means clearing the count value of encoder 0.
01 06 00 1A 00 0A 28 0A
Module address write single holding register register address high register address low data high data low CRC check low CRC check high
If the module replies: 0106001A000A280A, it means the setting is successful. The count value of encoder 0 is modified to 0. If there is an alarm, it will be automatically cleared.
01 06 00 1A 00 0A 28 0A
Module address write single holding register register address high register address low data high data low CRC check low CRC check high
Modbus RTU
Encoder pulse counter, angular velocity displacement measurement, module WJ66
Warranty:
Within two years from the date of sale of this product, if the user complies with the storage, transportation and use requirements, and the product quality is lower than the technical specifications, it can be returned to the factory for free.
Free maintenance. If damage is caused due to violation of operating regulations and requirements, device fees and maintenance fees will need to be paid.
copyright:
No part of this manual may be copied, distributed, translated or transmitted without permission. This manual is subject to modification and update without prior notice.
trademark:
Other trademarks and copyrights mentioned in this manual belong to their respective owners.
Version number: