background image

11 

5.4. Command list 

The ZS-6222A recognizes the first byte of data as a control command and controls it. 
Also, be sure to add a delimiter (CR+LF) at the end of the data string before sending. 
If there is a character string other than the command at the beginning of the data, NG will be 
  sent as the return value. 
The commands are as follows. 

command 

function 

  Reads data from all ports set as inputs 

  Writes data to a port set to output 

Output pulse from TRG signal 

Output pulse from CLR signal 

  Configure port input/output settings 

  Sets the pulse width of the control signal 

  Sets the presence or absence of the latch circuit 

  Set the output signal 

  Sets the positive/negative logic of the port 

 
 

5.4.1. R command 

 

function 

Data is read from all ports that are set as inputs. For example, if 4 input ports are 

  set, the "R" command will send 8 bytes of data from the ZS-6222A.   

 

format 

CR LF

 

 

return value 

xxxx

・・・

CR LF 

  : The number of data set in the input port is sent. 

 

 

 

 

x is an ASCII code from 0 to F 

NG 

CR LF 

 

: No input port 

 

5.4.2. W command 

 

function 

Data is written to the ports set for output. 
For example, if four output ports are set, the "W" command is followed by 8 bytes of   
data to be sent to the ZS-6222A. 
If less than 8 bytes of data is sent, the amount of data sent will be newly changed,   
and the previous data will be retained in the missing parts.   

 

format 

Wxxxx

・・・

CR LF 

: Write the data to be output to the output port after "W" 

 

 

 

 

x is an ASCII code from 0 to F 

 

return value 

OK 

CR LF 

 

: Completion of data output to the output port 

NG 

CR LF 

 

: No output port, wrong data character error 

 

Содержание ZS-6222A Series

Страница 1: ...1 ZS 6222A Series USB DIO Adapter instruction manual 1st edition 2 13 37 Honmachi Fuchu City Tokyo 183 0027 Phone 81 42 368 2126 Fax 81 42 364 0067 URL https www zenisu co jp ...

Страница 2: ...tion on Windows 10 11 6 4 2 Installation on Windows 7 8 6 4 3 Installation on Windows Vista XP 2000 7 5 Operation 8 5 1 Transfer data method 8 5 2 Control Signals 9 5 3 Input output operation 10 5 4 Command list 11 5 4 1 R command 11 5 4 2 W command 11 5 4 3 T command 12 5 4 4 C command 12 5 4 5 D command 12 5 4 6 P command 12 5 4 7 L command 13 5 4 8 U command 13 5 4 9 B Command 13 6 Connector ta...

Страница 3: ...ily performed from the USB port of a personal computer There are 4 ports 8 bits port for digital I O signals each with input output selection for each port In addition to data a control line is provided to synchronize with an external device 3 Specifications 3 1 Operating environment PC IBM PC AT compatible machine USB port required OS Microsoft Windows 2000 XP Vista 7 8 10 11 Linux Mac We have no...

Страница 4: ... Small case low price Data connector 50 core flat cable 50 core flat cable Power supply DC4 75V to 5 25V 100mA or less DC4 75V to 5 25V 100mA or less Usage environment Temperature 0 C to 50 C Humidity 85 max Temperature 0 C to 50 C Humidity 85 max Storage temperature 20 C to 80 C 20 C to 80 C External dimensions 74 x 100 x about 20 H 80 x 110 x about 30 H Accessories data connector FAS 5001 2101 0...

Страница 5: ...5 3 5 Appearance and dimensional drawing ZS 6222AP PC board type ZS 6222AS small case type Dimensional drawing ZS 6222AP ZS 6222AS ...

Страница 6: ...ssary to first install the hardware and device drivers according to the following procedure Install the device driver on your PC Connect the instrument and the computer with a USB cable Installation completed reboot in some cases The following is an explanation of how to install the device driver for the The following screenshots may differ in text display etc depending on the PC configuration and...

Страница 7: ...lly and the COM port connection will be possible Depending on the configuration of your computer you may be asked to restart In that case follow the on screen instructions Please reboot 4 3 Installation on Windows Vista XP 2000 Windows Vista XP 2000 is installed it is necessary to obtain an older version of the driver from FTDI s HP and install it https ftdichip com drivers vcp drivers the link se...

Страница 8: ...evice manager of each OS x is a number The value varies depending on the connection environment When creating a program open it according to the COM number displayed Data code assignment table ASCII code is used for data transfer and one character is converted to 4 bit binary code 4 bit binary USB data 8 4 2 1 HEX 0 0 0 0 0 0 0 0 1 1 0 0 1 0 2 0 0 1 1 3 0 1 0 0 4 0 1 0 1 5 0 1 1 0 6 0 1 1 1 7 1 0 ...

Страница 9: ...D3 to D0 of port 4 5 2 Control Signals A control signal is provided to synchronize with the connected device Signal name signal direction explanation STB OUT The adapter completes receiving all data from the PC and outputs a pulse signal after output to the port External devices can use this signal for Latch Clock or other purposes as needed TRG OUT Pulse signals are output to external devices by ...

Страница 10: ... data will remain in the missing area pulse output After receiving the data from the PC send the data to the port set for output Set data in 4 bit units in the order of high order and low order Output port data is output only for the specified pulse width Send data input from port to PC No latch When the ZS 6222A receives an R command from the PC it takes data from the input port at that time in t...

Страница 11: ...ve logic of the port 5 4 1 R command function Data is read from all ports that are set as inputs For example if 4 input ports are set the R command will send 8 bytes of data from the ZS 6222A format R CR LF return value xxxx CR LF The number of data set in the input port is sent x is an ASCII code from 0 to F NG CR LF No input port 5 4 2 W command function Data is written to the ports set for outp...

Страница 12: ...at Dxxxx CR LF After D set port port port and port in this order x writes I for IN for input and O for OUT for output return value OK CR LF Setting completed NG CR LF Input output setting error setting character error 5 4 6 P command function The pulse widths of the control signals STB TRG and CLR and the pulse width at data output can be set from one of five types 10µs 100µs 1ms 10ms and 100ms Wh...

Страница 13: ...o continuous output The pulse width at the time of pulse output is set by the P command format Ux CR LF x is a number 0 for continuous output and 1 for pulse output return value OK CR LF Setting complete NG CR LF Setting error wrong setting error 5 4 9 B Command function Positive and negative logic settings for the four ports When the ZS 6222A is powered on all are set to positive logic This comma...

Страница 14: ...D6 29 30 D6 D7 31 32 D7 IN LAH 33 34 5V OUT STBs 35 36 5V OUT TRG 37 38 5V OUT CLR 39 40 5V NC 41 42 GND NC 43 44 GND NC 45 46 GND NC 47 48 GND NC 49 50 GND Note PIN 34 36 38 and 40 are NC in the former model ZS 6222 and 5V in the ZS 6222A Note I O indicates the direction between signals between the ZS 6222A adapter and the digital I O signal input output device IN ZS 6222A External device OUT ZS ...

Страница 15: ...under normal conditions of use in accordance with the instruction manual and other notes In the following cases the product will be repaired for a fee even during the warranty period Malfunction or damage caused by improper use or carelessness Malfunction or damage caused by improper repair or modification Malfunction or damage caused by fire earthquake other natural disasters earthquakes or exter...

Отзывы: