Communication interface, can be secondary development
1, USB interface (power supply, can communicate via USB)
2, serial communication protocol analysis
The overall structure of CNC attenuator ATT-6000 protocol adopts the command line method. The communication baud rate is 115200bps. It is issued by the PC and executed by the local machine. Then the result is returned to the PC. The command is limited to the lowercase letters a~z, the number 0. ~9, the end of each command is a newline character (hexadecimal expression is "0x0a" or '/n')
Communication commands include two types of commands: the w command and the r command.
Rid command: read the version number
The PC sends "rid + 0x0a", the machine returns the model number of the machine, and the result is: ATT-6000 (The format of the returned machine model data is ASCII character format. Note that there is a line feed "0x0a" or '/n').
Wv0 command: Set the attenuation value
The format is: wv0xxxx + 0x0a, a total of 8 bytes;
Where "xxxx" is the attenuation value represented by 4 numbers, for example:
Wv01150+0x0a: indicates that the write attenuation is: 11.5DB (the maximum attenuation is 0-6000 and the step is 25)
Convert to Hexadecimal: Yes 0X77 0X76 0X30 0X31 0X31 0X35 0X31 0X0a