USB Driver Instruction Manual

36
Instruction Manual USB Driver * Matsusada Precision Rev. 0.4

Transcript of USB Driver Instruction Manual

Page 1: USB Driver Instruction Manual

Instruction Manual

USB Driver

Matsusada Precision

Rev 04

CONTENTS

Page

1 Introduction 1

1 - 1 Device driver 1

1 - 2 Driver CD 1

2 Install 2

2-1 Connection to USB controller 2

2-2 Installation of driver(Windows XP2000) 2

2-3 Installation of driver(Windows Vista) 8

2-4 Installation of driver (Windows 98SEMe) 17

2-5 In case not able to install 18

2-6 Confirmation of virtual Com port number 18

3 Sample program 19

3 - 1 Direct version executable file of communication program 19

3 - 2 Sample program with Visual Basic 60 20

3 - 3 Sample program with Visual C++ 60 26

1 Introduction

Thank you very much for purchasing our USB product

Although we have made all possible efforts to produce a very accurate manual if you find any

mistakes please contact our customer support The contents of this manual may be changed

without notice No liability can be accepted for any errors

The contents is made based on image of Windows XP Professional Windows VistaMindows

9aSE Notice that you may see some different image if using other as version

The software does not function by itself Please use our Power Supply and Digital Controller after

installing your special application program based on our sample

1 -1 Device driver

There are following two models of device drivers for attaching to our products

Directly control USB interface Direct version

Use as serial port (Com port) Virtual Com port version

If application software made by the customer is RS-232C controlled our products will be

controlled by just adding Com port assigned to existing process by using virtual Com port version

However if using several units controlled together generate application on direct version (See 3

Sample Program in case mUltiple units are used)

Sample program is described some examples e of how device driver of direct version is used

In case use of only direct version virtual Com port is installed and new Com port is assigned

1-2 Driver CD

MTP USB Driver L 98ME folder Device driver for Windows98Me L amd64 folder 64bits driverinterfacesupport file L i386 folder 32bits driverlinterfacesupport file L Sample folder Sample program for VBNC++ 60 L D2XXPG34pdf Device driver of direct version Programmers guide L ftd2xxh Direct version of device driver header file L ftdibuscat Direct version of device driver reference file of direct version L ftd iport cat Virtual Com port version of device driver reference file L MTPBUSinf Direct version of device driver install file L MTPPORTinf Virtual Com port version of device driver install file

2 Install

2 -1 Connection to the USB controller

Connect the unit to 2 PC with an USB cable (Nhen the power of the unit is off)

2 - 2 Installation of driver(Windows XP2000)

Turn on the power of the unit

Note that the following procedure is based on the case of Windows XP(Microsoft)

When turning on the unit windows of driver search will pop up (fig 1)

Check lt Install from a list or specific location [Advanced] gt

and click lt Nextgt

Welcome to the Found New Hardware Wizard

This wizard helps you install software for

MATSUSADA PRECISION USB MODULE

) If your hardware came wilh an inslallalion CD 0) or floppy disk imerl il now

What do you want the wizard to do

C Install the software automaticall Recommended

i~) JQ~taIrJiCiii)middotaJJs-imiddotmiddotQrjpi~IikCic~HgmiddotQJA~Y~6c~~j

Click Next to continue

Nextgt 1 [ Cancel

fig1

When the window of fig 2 pop up insert the attached CD-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM j gt

then click lt Nextgt

~ ii~~Si9~iF~~~~t~ii~~~~h~~ii~~~~Iq~~ Use the check boxes below to limit or expand the default search vklich includes local paths and removable media The best driver found will be installed

[2] Search removable media (floppy CD-ROM

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

lt~ack I[ Hextgt ] I Cancel

fig2

If the window of fig3 pop up click lt Continue Anywaygt

Pease choose your search end installation optiongt_

The software you are installing for this hardware

MATSUSADA PRECISICIN USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this soflware may impair 01 destabilize the correct operation of your system either immediately or in the future Microsoft shongly recommends that you stop this installation now and contact the hardware vendorfor software that has passed Windows logo testing

Fig3

Please wail linile the wizard inslalls lhe software

FT DZltXU ~l exe To CWItmOWSSystem32

fig A

When the window of fig5 appear install is completed Click lt Finish gt

Completing the Found New Hardware Wizard

The wizard has finished installing the software for

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig5

Afier turn on a computer and completes installation of direct version of device driver it

continuously displays installation retrieval screen of virtual Com port of device driver (fig 6)

Check lt Install from a list or specific location [Advanced] gt

and click lt Nextgt

Welcome to the Found New Hardware Vizard

This wizald helps you inslal software fOI

USB Serial Port

lt) If yOU hardware came with an installation CD ~1 or floppy disk insert it now

What do you want the wizard to do

cmiddot Install the software automaticall Recommended

( J0~x~rIJr()fJ1middotmiddot~OiIst~imiddotiP~~lti~i(jc~ij(JrllA~~~~~~J

Click Next to continue

tlextgt J l Cancel

fig6

When the window of fig 7 pop up insert the attached CO-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM ] gt

then click lt Nextgt

lt~)~e~i~hi9fiEe~~i(~ix~rjith~~ij(~~~tI96~ Use the check boxes below to limit or expand the derault search which includes local paths and removable media The best driver found will be installed

o Search removable media [floppy CDmiddotROM )

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

ltftack ][ lextgt ] l Cancel

fig

If the window of fig8 pop up click lt Continue Anywaygt

floase choose your search and inslllation options

The software you are installing for this hardware

MATSUSADA PRECISION USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing

fig8

~ilTSUSpDA PRECiSION US8 ~lODJLE

FT DZXXU N axe

To CWINDOWSSJslem32 -middot--------------~-----------middotmiddot--I

Please wait while the wizard installs the software_

fig9

If screen (fig 10) pops up the installation of virtual Com port of device driver is completed Click

ltFinishgt

Completing the Found New Hardware Wizard

The wizard has finished installing the software fOl

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig10

2 - 3 Installation of driver(Nindows Vista)

Turn on power of the unit

Note that the folowing procedure is based on the case of Windows Vista (Microsoft)

On Windows Vista it directly specifies the driver and start install

Driver can be installed different way which is not described on this manual but driver of the other

OS (Windows 98 Me and so on) would be searched and installed Therefore install the driver after

confirming manual to use normally

After turning on searching screen of direct version of device driver will pop up

Select ltLocate and install driver software (recommendedraquo

Found New Hardware --

It takes longer searching depends on usage environment

When next screen pops up select ltI dont have the disc Show me other options gt

V GU middotJ~middott1h-c li~( (-lj11l~i ~lrl )1_1 Jmiddoti~t in~cmiddott i nc ll~i~ middot1 cttJ~middotrmiddot~~i~Jly

~t3(h th- (11( fjr Irimiddot ~r ~Jlt~rr

Message shows Windows couldnt find driver software for your device but select ltBrowse my computer for driver software (advanced) gt

-gt Check for u solution Viird) I iii h~d 10 ~ if lilff eft itltE GIJ (an tck 10 gd you Gbl(t

middotmiddotcrkl

~ BLGwe my cornputer for driler sofwlareadvaiCed) Lo~atc m in~LJII driver ~~fbJrc mJnu~lly

Cancel

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 2: USB Driver Instruction Manual

CONTENTS

Page

1 Introduction 1

1 - 1 Device driver 1

1 - 2 Driver CD 1

2 Install 2

2-1 Connection to USB controller 2

2-2 Installation of driver(Windows XP2000) 2

2-3 Installation of driver(Windows Vista) 8

2-4 Installation of driver (Windows 98SEMe) 17

2-5 In case not able to install 18

2-6 Confirmation of virtual Com port number 18

3 Sample program 19

3 - 1 Direct version executable file of communication program 19

3 - 2 Sample program with Visual Basic 60 20

3 - 3 Sample program with Visual C++ 60 26

1 Introduction

Thank you very much for purchasing our USB product

Although we have made all possible efforts to produce a very accurate manual if you find any

mistakes please contact our customer support The contents of this manual may be changed

without notice No liability can be accepted for any errors

The contents is made based on image of Windows XP Professional Windows VistaMindows

9aSE Notice that you may see some different image if using other as version

The software does not function by itself Please use our Power Supply and Digital Controller after

installing your special application program based on our sample

1 -1 Device driver

There are following two models of device drivers for attaching to our products

Directly control USB interface Direct version

Use as serial port (Com port) Virtual Com port version

If application software made by the customer is RS-232C controlled our products will be

controlled by just adding Com port assigned to existing process by using virtual Com port version

However if using several units controlled together generate application on direct version (See 3

Sample Program in case mUltiple units are used)

Sample program is described some examples e of how device driver of direct version is used

In case use of only direct version virtual Com port is installed and new Com port is assigned

1-2 Driver CD

MTP USB Driver L 98ME folder Device driver for Windows98Me L amd64 folder 64bits driverinterfacesupport file L i386 folder 32bits driverlinterfacesupport file L Sample folder Sample program for VBNC++ 60 L D2XXPG34pdf Device driver of direct version Programmers guide L ftd2xxh Direct version of device driver header file L ftdibuscat Direct version of device driver reference file of direct version L ftd iport cat Virtual Com port version of device driver reference file L MTPBUSinf Direct version of device driver install file L MTPPORTinf Virtual Com port version of device driver install file

2 Install

2 -1 Connection to the USB controller

Connect the unit to 2 PC with an USB cable (Nhen the power of the unit is off)

2 - 2 Installation of driver(Windows XP2000)

Turn on the power of the unit

Note that the following procedure is based on the case of Windows XP(Microsoft)

When turning on the unit windows of driver search will pop up (fig 1)

Check lt Install from a list or specific location [Advanced] gt

and click lt Nextgt

Welcome to the Found New Hardware Wizard

This wizard helps you install software for

MATSUSADA PRECISION USB MODULE

) If your hardware came wilh an inslallalion CD 0) or floppy disk imerl il now

What do you want the wizard to do

C Install the software automaticall Recommended

i~) JQ~taIrJiCiii)middotaJJs-imiddotmiddotQrjpi~IikCic~HgmiddotQJA~Y~6c~~j

Click Next to continue

Nextgt 1 [ Cancel

fig1

When the window of fig 2 pop up insert the attached CD-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM j gt

then click lt Nextgt

~ ii~~Si9~iF~~~~t~ii~~~~h~~ii~~~~Iq~~ Use the check boxes below to limit or expand the default search vklich includes local paths and removable media The best driver found will be installed

[2] Search removable media (floppy CD-ROM

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

lt~ack I[ Hextgt ] I Cancel

fig2

If the window of fig3 pop up click lt Continue Anywaygt

Pease choose your search end installation optiongt_

The software you are installing for this hardware

MATSUSADA PRECISICIN USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this soflware may impair 01 destabilize the correct operation of your system either immediately or in the future Microsoft shongly recommends that you stop this installation now and contact the hardware vendorfor software that has passed Windows logo testing

Fig3

Please wail linile the wizard inslalls lhe software

FT DZltXU ~l exe To CWItmOWSSystem32

fig A

When the window of fig5 appear install is completed Click lt Finish gt

Completing the Found New Hardware Wizard

The wizard has finished installing the software for

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig5

Afier turn on a computer and completes installation of direct version of device driver it

continuously displays installation retrieval screen of virtual Com port of device driver (fig 6)

Check lt Install from a list or specific location [Advanced] gt

and click lt Nextgt

Welcome to the Found New Hardware Vizard

This wizald helps you inslal software fOI

USB Serial Port

lt) If yOU hardware came with an installation CD ~1 or floppy disk insert it now

What do you want the wizard to do

cmiddot Install the software automaticall Recommended

( J0~x~rIJr()fJ1middotmiddot~OiIst~imiddotiP~~lti~i(jc~ij(JrllA~~~~~~J

Click Next to continue

tlextgt J l Cancel

fig6

When the window of fig 7 pop up insert the attached CO-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM ] gt

then click lt Nextgt

lt~)~e~i~hi9fiEe~~i(~ix~rjith~~ij(~~~tI96~ Use the check boxes below to limit or expand the derault search which includes local paths and removable media The best driver found will be installed

o Search removable media [floppy CDmiddotROM )

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

ltftack ][ lextgt ] l Cancel

fig

If the window of fig8 pop up click lt Continue Anywaygt

floase choose your search and inslllation options

The software you are installing for this hardware

MATSUSADA PRECISION USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing

fig8

~ilTSUSpDA PRECiSION US8 ~lODJLE

FT DZXXU N axe

To CWINDOWSSJslem32 -middot--------------~-----------middotmiddot--I

Please wait while the wizard installs the software_

fig9

If screen (fig 10) pops up the installation of virtual Com port of device driver is completed Click

ltFinishgt

Completing the Found New Hardware Wizard

The wizard has finished installing the software fOl

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig10

2 - 3 Installation of driver(Nindows Vista)

Turn on power of the unit

Note that the folowing procedure is based on the case of Windows Vista (Microsoft)

On Windows Vista it directly specifies the driver and start install

Driver can be installed different way which is not described on this manual but driver of the other

OS (Windows 98 Me and so on) would be searched and installed Therefore install the driver after

confirming manual to use normally

After turning on searching screen of direct version of device driver will pop up

Select ltLocate and install driver software (recommendedraquo

Found New Hardware --

It takes longer searching depends on usage environment

When next screen pops up select ltI dont have the disc Show me other options gt

V GU middotJ~middott1h-c li~( (-lj11l~i ~lrl )1_1 Jmiddoti~t in~cmiddott i nc ll~i~ middot1 cttJ~middotrmiddot~~i~Jly

~t3(h th- (11( fjr Irimiddot ~r ~Jlt~rr

Message shows Windows couldnt find driver software for your device but select ltBrowse my computer for driver software (advanced) gt

-gt Check for u solution Viird) I iii h~d 10 ~ if lilff eft itltE GIJ (an tck 10 gd you Gbl(t

middotmiddotcrkl

~ BLGwe my cornputer for driler sofwlareadvaiCed) Lo~atc m in~LJII driver ~~fbJrc mJnu~lly

Cancel

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 3: USB Driver Instruction Manual

1 Introduction

Thank you very much for purchasing our USB product

Although we have made all possible efforts to produce a very accurate manual if you find any

mistakes please contact our customer support The contents of this manual may be changed

without notice No liability can be accepted for any errors

The contents is made based on image of Windows XP Professional Windows VistaMindows

9aSE Notice that you may see some different image if using other as version

The software does not function by itself Please use our Power Supply and Digital Controller after

installing your special application program based on our sample

1 -1 Device driver

There are following two models of device drivers for attaching to our products

Directly control USB interface Direct version

Use as serial port (Com port) Virtual Com port version

If application software made by the customer is RS-232C controlled our products will be

controlled by just adding Com port assigned to existing process by using virtual Com port version

However if using several units controlled together generate application on direct version (See 3

Sample Program in case mUltiple units are used)

Sample program is described some examples e of how device driver of direct version is used

In case use of only direct version virtual Com port is installed and new Com port is assigned

1-2 Driver CD

MTP USB Driver L 98ME folder Device driver for Windows98Me L amd64 folder 64bits driverinterfacesupport file L i386 folder 32bits driverlinterfacesupport file L Sample folder Sample program for VBNC++ 60 L D2XXPG34pdf Device driver of direct version Programmers guide L ftd2xxh Direct version of device driver header file L ftdibuscat Direct version of device driver reference file of direct version L ftd iport cat Virtual Com port version of device driver reference file L MTPBUSinf Direct version of device driver install file L MTPPORTinf Virtual Com port version of device driver install file

2 Install

2 -1 Connection to the USB controller

Connect the unit to 2 PC with an USB cable (Nhen the power of the unit is off)

2 - 2 Installation of driver(Windows XP2000)

Turn on the power of the unit

Note that the following procedure is based on the case of Windows XP(Microsoft)

When turning on the unit windows of driver search will pop up (fig 1)

Check lt Install from a list or specific location [Advanced] gt

and click lt Nextgt

Welcome to the Found New Hardware Wizard

This wizard helps you install software for

MATSUSADA PRECISION USB MODULE

) If your hardware came wilh an inslallalion CD 0) or floppy disk imerl il now

What do you want the wizard to do

C Install the software automaticall Recommended

i~) JQ~taIrJiCiii)middotaJJs-imiddotmiddotQrjpi~IikCic~HgmiddotQJA~Y~6c~~j

Click Next to continue

Nextgt 1 [ Cancel

fig1

When the window of fig 2 pop up insert the attached CD-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM j gt

then click lt Nextgt

~ ii~~Si9~iF~~~~t~ii~~~~h~~ii~~~~Iq~~ Use the check boxes below to limit or expand the default search vklich includes local paths and removable media The best driver found will be installed

[2] Search removable media (floppy CD-ROM

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

lt~ack I[ Hextgt ] I Cancel

fig2

If the window of fig3 pop up click lt Continue Anywaygt

Pease choose your search end installation optiongt_

The software you are installing for this hardware

MATSUSADA PRECISICIN USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this soflware may impair 01 destabilize the correct operation of your system either immediately or in the future Microsoft shongly recommends that you stop this installation now and contact the hardware vendorfor software that has passed Windows logo testing

Fig3

Please wail linile the wizard inslalls lhe software

FT DZltXU ~l exe To CWItmOWSSystem32

fig A

When the window of fig5 appear install is completed Click lt Finish gt

Completing the Found New Hardware Wizard

The wizard has finished installing the software for

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig5

Afier turn on a computer and completes installation of direct version of device driver it

continuously displays installation retrieval screen of virtual Com port of device driver (fig 6)

Check lt Install from a list or specific location [Advanced] gt

and click lt Nextgt

Welcome to the Found New Hardware Vizard

This wizald helps you inslal software fOI

USB Serial Port

lt) If yOU hardware came with an installation CD ~1 or floppy disk insert it now

What do you want the wizard to do

cmiddot Install the software automaticall Recommended

( J0~x~rIJr()fJ1middotmiddot~OiIst~imiddotiP~~lti~i(jc~ij(JrllA~~~~~~J

Click Next to continue

tlextgt J l Cancel

fig6

When the window of fig 7 pop up insert the attached CO-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM ] gt

then click lt Nextgt

lt~)~e~i~hi9fiEe~~i(~ix~rjith~~ij(~~~tI96~ Use the check boxes below to limit or expand the derault search which includes local paths and removable media The best driver found will be installed

o Search removable media [floppy CDmiddotROM )

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

ltftack ][ lextgt ] l Cancel

fig

If the window of fig8 pop up click lt Continue Anywaygt

floase choose your search and inslllation options

The software you are installing for this hardware

MATSUSADA PRECISION USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing

fig8

~ilTSUSpDA PRECiSION US8 ~lODJLE

FT DZXXU N axe

To CWINDOWSSJslem32 -middot--------------~-----------middotmiddot--I

Please wait while the wizard installs the software_

fig9

If screen (fig 10) pops up the installation of virtual Com port of device driver is completed Click

ltFinishgt

Completing the Found New Hardware Wizard

The wizard has finished installing the software fOl

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig10

2 - 3 Installation of driver(Nindows Vista)

Turn on power of the unit

Note that the folowing procedure is based on the case of Windows Vista (Microsoft)

On Windows Vista it directly specifies the driver and start install

Driver can be installed different way which is not described on this manual but driver of the other

OS (Windows 98 Me and so on) would be searched and installed Therefore install the driver after

confirming manual to use normally

After turning on searching screen of direct version of device driver will pop up

Select ltLocate and install driver software (recommendedraquo

Found New Hardware --

It takes longer searching depends on usage environment

When next screen pops up select ltI dont have the disc Show me other options gt

V GU middotJ~middott1h-c li~( (-lj11l~i ~lrl )1_1 Jmiddoti~t in~cmiddott i nc ll~i~ middot1 cttJ~middotrmiddot~~i~Jly

~t3(h th- (11( fjr Irimiddot ~r ~Jlt~rr

Message shows Windows couldnt find driver software for your device but select ltBrowse my computer for driver software (advanced) gt

-gt Check for u solution Viird) I iii h~d 10 ~ if lilff eft itltE GIJ (an tck 10 gd you Gbl(t

middotmiddotcrkl

~ BLGwe my cornputer for driler sofwlareadvaiCed) Lo~atc m in~LJII driver ~~fbJrc mJnu~lly

Cancel

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 4: USB Driver Instruction Manual

2 Install

2 -1 Connection to the USB controller

Connect the unit to 2 PC with an USB cable (Nhen the power of the unit is off)

2 - 2 Installation of driver(Windows XP2000)

Turn on the power of the unit

Note that the following procedure is based on the case of Windows XP(Microsoft)

When turning on the unit windows of driver search will pop up (fig 1)

Check lt Install from a list or specific location [Advanced] gt

and click lt Nextgt

Welcome to the Found New Hardware Wizard

This wizard helps you install software for

MATSUSADA PRECISION USB MODULE

) If your hardware came wilh an inslallalion CD 0) or floppy disk imerl il now

What do you want the wizard to do

C Install the software automaticall Recommended

i~) JQ~taIrJiCiii)middotaJJs-imiddotmiddotQrjpi~IikCic~HgmiddotQJA~Y~6c~~j

Click Next to continue

Nextgt 1 [ Cancel

fig1

When the window of fig 2 pop up insert the attached CD-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM j gt

then click lt Nextgt

~ ii~~Si9~iF~~~~t~ii~~~~h~~ii~~~~Iq~~ Use the check boxes below to limit or expand the default search vklich includes local paths and removable media The best driver found will be installed

[2] Search removable media (floppy CD-ROM

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

lt~ack I[ Hextgt ] I Cancel

fig2

If the window of fig3 pop up click lt Continue Anywaygt

Pease choose your search end installation optiongt_

The software you are installing for this hardware

MATSUSADA PRECISICIN USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this soflware may impair 01 destabilize the correct operation of your system either immediately or in the future Microsoft shongly recommends that you stop this installation now and contact the hardware vendorfor software that has passed Windows logo testing

Fig3

Please wail linile the wizard inslalls lhe software

FT DZltXU ~l exe To CWItmOWSSystem32

fig A

When the window of fig5 appear install is completed Click lt Finish gt

Completing the Found New Hardware Wizard

The wizard has finished installing the software for

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig5

Afier turn on a computer and completes installation of direct version of device driver it

continuously displays installation retrieval screen of virtual Com port of device driver (fig 6)

Check lt Install from a list or specific location [Advanced] gt

and click lt Nextgt

Welcome to the Found New Hardware Vizard

This wizald helps you inslal software fOI

USB Serial Port

lt) If yOU hardware came with an installation CD ~1 or floppy disk insert it now

What do you want the wizard to do

cmiddot Install the software automaticall Recommended

( J0~x~rIJr()fJ1middotmiddot~OiIst~imiddotiP~~lti~i(jc~ij(JrllA~~~~~~J

Click Next to continue

tlextgt J l Cancel

fig6

When the window of fig 7 pop up insert the attached CO-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM ] gt

then click lt Nextgt

lt~)~e~i~hi9fiEe~~i(~ix~rjith~~ij(~~~tI96~ Use the check boxes below to limit or expand the derault search which includes local paths and removable media The best driver found will be installed

o Search removable media [floppy CDmiddotROM )

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

ltftack ][ lextgt ] l Cancel

fig

If the window of fig8 pop up click lt Continue Anywaygt

floase choose your search and inslllation options

The software you are installing for this hardware

MATSUSADA PRECISION USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing

fig8

~ilTSUSpDA PRECiSION US8 ~lODJLE

FT DZXXU N axe

To CWINDOWSSJslem32 -middot--------------~-----------middotmiddot--I

Please wait while the wizard installs the software_

fig9

If screen (fig 10) pops up the installation of virtual Com port of device driver is completed Click

ltFinishgt

Completing the Found New Hardware Wizard

The wizard has finished installing the software fOl

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig10

2 - 3 Installation of driver(Nindows Vista)

Turn on power of the unit

Note that the folowing procedure is based on the case of Windows Vista (Microsoft)

On Windows Vista it directly specifies the driver and start install

Driver can be installed different way which is not described on this manual but driver of the other

OS (Windows 98 Me and so on) would be searched and installed Therefore install the driver after

confirming manual to use normally

After turning on searching screen of direct version of device driver will pop up

Select ltLocate and install driver software (recommendedraquo

Found New Hardware --

It takes longer searching depends on usage environment

When next screen pops up select ltI dont have the disc Show me other options gt

V GU middotJ~middott1h-c li~( (-lj11l~i ~lrl )1_1 Jmiddoti~t in~cmiddott i nc ll~i~ middot1 cttJ~middotrmiddot~~i~Jly

~t3(h th- (11( fjr Irimiddot ~r ~Jlt~rr

Message shows Windows couldnt find driver software for your device but select ltBrowse my computer for driver software (advanced) gt

-gt Check for u solution Viird) I iii h~d 10 ~ if lilff eft itltE GIJ (an tck 10 gd you Gbl(t

middotmiddotcrkl

~ BLGwe my cornputer for driler sofwlareadvaiCed) Lo~atc m in~LJII driver ~~fbJrc mJnu~lly

Cancel

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 5: USB Driver Instruction Manual

When the window of fig 2 pop up insert the attached CD-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM j gt

then click lt Nextgt

~ ii~~Si9~iF~~~~t~ii~~~~h~~ii~~~~Iq~~ Use the check boxes below to limit or expand the default search vklich includes local paths and removable media The best driver found will be installed

[2] Search removable media (floppy CD-ROM

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

lt~ack I[ Hextgt ] I Cancel

fig2

If the window of fig3 pop up click lt Continue Anywaygt

Pease choose your search end installation optiongt_

The software you are installing for this hardware

MATSUSADA PRECISICIN USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this soflware may impair 01 destabilize the correct operation of your system either immediately or in the future Microsoft shongly recommends that you stop this installation now and contact the hardware vendorfor software that has passed Windows logo testing

Fig3

Please wail linile the wizard inslalls lhe software

FT DZltXU ~l exe To CWItmOWSSystem32

fig A

When the window of fig5 appear install is completed Click lt Finish gt

Completing the Found New Hardware Wizard

The wizard has finished installing the software for

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig5

Afier turn on a computer and completes installation of direct version of device driver it

continuously displays installation retrieval screen of virtual Com port of device driver (fig 6)

Check lt Install from a list or specific location [Advanced] gt

and click lt Nextgt

Welcome to the Found New Hardware Vizard

This wizald helps you inslal software fOI

USB Serial Port

lt) If yOU hardware came with an installation CD ~1 or floppy disk insert it now

What do you want the wizard to do

cmiddot Install the software automaticall Recommended

( J0~x~rIJr()fJ1middotmiddot~OiIst~imiddotiP~~lti~i(jc~ij(JrllA~~~~~~J

Click Next to continue

tlextgt J l Cancel

fig6

When the window of fig 7 pop up insert the attached CO-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM ] gt

then click lt Nextgt

lt~)~e~i~hi9fiEe~~i(~ix~rjith~~ij(~~~tI96~ Use the check boxes below to limit or expand the derault search which includes local paths and removable media The best driver found will be installed

o Search removable media [floppy CDmiddotROM )

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

ltftack ][ lextgt ] l Cancel

fig

If the window of fig8 pop up click lt Continue Anywaygt

floase choose your search and inslllation options

The software you are installing for this hardware

MATSUSADA PRECISION USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing

fig8

~ilTSUSpDA PRECiSION US8 ~lODJLE

FT DZXXU N axe

To CWINDOWSSJslem32 -middot--------------~-----------middotmiddot--I

Please wait while the wizard installs the software_

fig9

If screen (fig 10) pops up the installation of virtual Com port of device driver is completed Click

ltFinishgt

Completing the Found New Hardware Wizard

The wizard has finished installing the software fOl

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig10

2 - 3 Installation of driver(Nindows Vista)

Turn on power of the unit

Note that the folowing procedure is based on the case of Windows Vista (Microsoft)

On Windows Vista it directly specifies the driver and start install

Driver can be installed different way which is not described on this manual but driver of the other

OS (Windows 98 Me and so on) would be searched and installed Therefore install the driver after

confirming manual to use normally

After turning on searching screen of direct version of device driver will pop up

Select ltLocate and install driver software (recommendedraquo

Found New Hardware --

It takes longer searching depends on usage environment

When next screen pops up select ltI dont have the disc Show me other options gt

V GU middotJ~middott1h-c li~( (-lj11l~i ~lrl )1_1 Jmiddoti~t in~cmiddott i nc ll~i~ middot1 cttJ~middotrmiddot~~i~Jly

~t3(h th- (11( fjr Irimiddot ~r ~Jlt~rr

Message shows Windows couldnt find driver software for your device but select ltBrowse my computer for driver software (advanced) gt

-gt Check for u solution Viird) I iii h~d 10 ~ if lilff eft itltE GIJ (an tck 10 gd you Gbl(t

middotmiddotcrkl

~ BLGwe my cornputer for driler sofwlareadvaiCed) Lo~atc m in~LJII driver ~~fbJrc mJnu~lly

Cancel

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 6: USB Driver Instruction Manual

Please wail linile the wizard inslalls lhe software

FT DZltXU ~l exe To CWItmOWSSystem32

fig A

When the window of fig5 appear install is completed Click lt Finish gt

Completing the Found New Hardware Wizard

The wizard has finished installing the software for

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig5

Afier turn on a computer and completes installation of direct version of device driver it

continuously displays installation retrieval screen of virtual Com port of device driver (fig 6)

Check lt Install from a list or specific location [Advanced] gt

and click lt Nextgt

Welcome to the Found New Hardware Vizard

This wizald helps you inslal software fOI

USB Serial Port

lt) If yOU hardware came with an installation CD ~1 or floppy disk insert it now

What do you want the wizard to do

cmiddot Install the software automaticall Recommended

( J0~x~rIJr()fJ1middotmiddot~OiIst~imiddotiP~~lti~i(jc~ij(JrllA~~~~~~J

Click Next to continue

tlextgt J l Cancel

fig6

When the window of fig 7 pop up insert the attached CO-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM ] gt

then click lt Nextgt

lt~)~e~i~hi9fiEe~~i(~ix~rjith~~ij(~~~tI96~ Use the check boxes below to limit or expand the derault search which includes local paths and removable media The best driver found will be installed

o Search removable media [floppy CDmiddotROM )

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

ltftack ][ lextgt ] l Cancel

fig

If the window of fig8 pop up click lt Continue Anywaygt

floase choose your search and inslllation options

The software you are installing for this hardware

MATSUSADA PRECISION USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing

fig8

~ilTSUSpDA PRECiSION US8 ~lODJLE

FT DZXXU N axe

To CWINDOWSSJslem32 -middot--------------~-----------middotmiddot--I

Please wait while the wizard installs the software_

fig9

If screen (fig 10) pops up the installation of virtual Com port of device driver is completed Click

ltFinishgt

Completing the Found New Hardware Wizard

The wizard has finished installing the software fOl

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig10

2 - 3 Installation of driver(Nindows Vista)

Turn on power of the unit

Note that the folowing procedure is based on the case of Windows Vista (Microsoft)

On Windows Vista it directly specifies the driver and start install

Driver can be installed different way which is not described on this manual but driver of the other

OS (Windows 98 Me and so on) would be searched and installed Therefore install the driver after

confirming manual to use normally

After turning on searching screen of direct version of device driver will pop up

Select ltLocate and install driver software (recommendedraquo

Found New Hardware --

It takes longer searching depends on usage environment

When next screen pops up select ltI dont have the disc Show me other options gt

V GU middotJ~middott1h-c li~( (-lj11l~i ~lrl )1_1 Jmiddoti~t in~cmiddott i nc ll~i~ middot1 cttJ~middotrmiddot~~i~Jly

~t3(h th- (11( fjr Irimiddot ~r ~Jlt~rr

Message shows Windows couldnt find driver software for your device but select ltBrowse my computer for driver software (advanced) gt

-gt Check for u solution Viird) I iii h~d 10 ~ if lilff eft itltE GIJ (an tck 10 gd you Gbl(t

middotmiddotcrkl

~ BLGwe my cornputer for driler sofwlareadvaiCed) Lo~atc m in~LJII driver ~~fbJrc mJnu~lly

Cancel

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 7: USB Driver Instruction Manual

Afier turn on a computer and completes installation of direct version of device driver it

continuously displays installation retrieval screen of virtual Com port of device driver (fig 6)

Check lt Install from a list or specific location [Advanced] gt

and click lt Nextgt

Welcome to the Found New Hardware Vizard

This wizald helps you inslal software fOI

USB Serial Port

lt) If yOU hardware came with an installation CD ~1 or floppy disk insert it now

What do you want the wizard to do

cmiddot Install the software automaticall Recommended

( J0~x~rIJr()fJ1middotmiddot~OiIst~imiddotiP~~lti~i(jc~ij(JrllA~~~~~~J

Click Next to continue

tlextgt J l Cancel

fig6

When the window of fig 7 pop up insert the attached CO-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM ] gt

then click lt Nextgt

lt~)~e~i~hi9fiEe~~i(~ix~rjith~~ij(~~~tI96~ Use the check boxes below to limit or expand the derault search which includes local paths and removable media The best driver found will be installed

o Search removable media [floppy CDmiddotROM )

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

ltftack ][ lextgt ] l Cancel

fig

If the window of fig8 pop up click lt Continue Anywaygt

floase choose your search and inslllation options

The software you are installing for this hardware

MATSUSADA PRECISION USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing

fig8

~ilTSUSpDA PRECiSION US8 ~lODJLE

FT DZXXU N axe

To CWINDOWSSJslem32 -middot--------------~-----------middotmiddot--I

Please wait while the wizard installs the software_

fig9

If screen (fig 10) pops up the installation of virtual Com port of device driver is completed Click

ltFinishgt

Completing the Found New Hardware Wizard

The wizard has finished installing the software fOl

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig10

2 - 3 Installation of driver(Nindows Vista)

Turn on power of the unit

Note that the folowing procedure is based on the case of Windows Vista (Microsoft)

On Windows Vista it directly specifies the driver and start install

Driver can be installed different way which is not described on this manual but driver of the other

OS (Windows 98 Me and so on) would be searched and installed Therefore install the driver after

confirming manual to use normally

After turning on searching screen of direct version of device driver will pop up

Select ltLocate and install driver software (recommendedraquo

Found New Hardware --

It takes longer searching depends on usage environment

When next screen pops up select ltI dont have the disc Show me other options gt

V GU middotJ~middott1h-c li~( (-lj11l~i ~lrl )1_1 Jmiddoti~t in~cmiddott i nc ll~i~ middot1 cttJ~middotrmiddot~~i~Jly

~t3(h th- (11( fjr Irimiddot ~r ~Jlt~rr

Message shows Windows couldnt find driver software for your device but select ltBrowse my computer for driver software (advanced) gt

-gt Check for u solution Viird) I iii h~d 10 ~ if lilff eft itltE GIJ (an tck 10 gd you Gbl(t

middotmiddotcrkl

~ BLGwe my cornputer for driler sofwlareadvaiCed) Lo~atc m in~LJII driver ~~fbJrc mJnu~lly

Cancel

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 8: USB Driver Instruction Manual

When the window of fig 7 pop up insert the attached CO-ROM to the PC

After that check lt Search for the best driver in these locations gt and

lt Search removable media [floppy CD-ROM ] gt

then click lt Nextgt

lt~)~e~i~hi9fiEe~~i(~ix~rjith~~ij(~~~tI96~ Use the check boxes below to limit or expand the derault search which includes local paths and removable media The best driver found will be installed

o Search removable media [floppy CDmiddotROM )

o Include this lQcation in the search

() Qont search I will choose the driver to install

Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware

ltftack ][ lextgt ] l Cancel

fig

If the window of fig8 pop up click lt Continue Anywaygt

floase choose your search and inslllation options

The software you are installing for this hardware

MATSUSADA PRECISION USB MODULE

has not passed Windows Logo testing to verify its compatibility with Windows XP (T ell me why this testing is important)

Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing

fig8

~ilTSUSpDA PRECiSION US8 ~lODJLE

FT DZXXU N axe

To CWINDOWSSJslem32 -middot--------------~-----------middotmiddot--I

Please wait while the wizard installs the software_

fig9

If screen (fig 10) pops up the installation of virtual Com port of device driver is completed Click

ltFinishgt

Completing the Found New Hardware Wizard

The wizard has finished installing the software fOl

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig10

2 - 3 Installation of driver(Nindows Vista)

Turn on power of the unit

Note that the folowing procedure is based on the case of Windows Vista (Microsoft)

On Windows Vista it directly specifies the driver and start install

Driver can be installed different way which is not described on this manual but driver of the other

OS (Windows 98 Me and so on) would be searched and installed Therefore install the driver after

confirming manual to use normally

After turning on searching screen of direct version of device driver will pop up

Select ltLocate and install driver software (recommendedraquo

Found New Hardware --

It takes longer searching depends on usage environment

When next screen pops up select ltI dont have the disc Show me other options gt

V GU middotJ~middott1h-c li~( (-lj11l~i ~lrl )1_1 Jmiddoti~t in~cmiddott i nc ll~i~ middot1 cttJ~middotrmiddot~~i~Jly

~t3(h th- (11( fjr Irimiddot ~r ~Jlt~rr

Message shows Windows couldnt find driver software for your device but select ltBrowse my computer for driver software (advanced) gt

-gt Check for u solution Viird) I iii h~d 10 ~ if lilff eft itltE GIJ (an tck 10 gd you Gbl(t

middotmiddotcrkl

~ BLGwe my cornputer for driler sofwlareadvaiCed) Lo~atc m in~LJII driver ~~fbJrc mJnu~lly

Cancel

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 9: USB Driver Instruction Manual

~ilTSUSpDA PRECiSION US8 ~lODJLE

FT DZXXU N axe

To CWINDOWSSJslem32 -middot--------------~-----------middotmiddot--I

Please wait while the wizard installs the software_

fig9

If screen (fig 10) pops up the installation of virtual Com port of device driver is completed Click

ltFinishgt

Completing the Found New Hardware Wizard

The wizard has finished installing the software fOl

MATSUSADA PRECISION USB MODULE

Click Finish to close the wizard

fig10

2 - 3 Installation of driver(Nindows Vista)

Turn on power of the unit

Note that the folowing procedure is based on the case of Windows Vista (Microsoft)

On Windows Vista it directly specifies the driver and start install

Driver can be installed different way which is not described on this manual but driver of the other

OS (Windows 98 Me and so on) would be searched and installed Therefore install the driver after

confirming manual to use normally

After turning on searching screen of direct version of device driver will pop up

Select ltLocate and install driver software (recommendedraquo

Found New Hardware --

It takes longer searching depends on usage environment

When next screen pops up select ltI dont have the disc Show me other options gt

V GU middotJ~middott1h-c li~( (-lj11l~i ~lrl )1_1 Jmiddoti~t in~cmiddott i nc ll~i~ middot1 cttJ~middotrmiddot~~i~Jly

~t3(h th- (11( fjr Irimiddot ~r ~Jlt~rr

Message shows Windows couldnt find driver software for your device but select ltBrowse my computer for driver software (advanced) gt

-gt Check for u solution Viird) I iii h~d 10 ~ if lilff eft itltE GIJ (an tck 10 gd you Gbl(t

middotmiddotcrkl

~ BLGwe my cornputer for driler sofwlareadvaiCed) Lo~atc m in~LJII driver ~~fbJrc mJnu~lly

Cancel

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 10: USB Driver Instruction Manual

2 - 3 Installation of driver(Nindows Vista)

Turn on power of the unit

Note that the folowing procedure is based on the case of Windows Vista (Microsoft)

On Windows Vista it directly specifies the driver and start install

Driver can be installed different way which is not described on this manual but driver of the other

OS (Windows 98 Me and so on) would be searched and installed Therefore install the driver after

confirming manual to use normally

After turning on searching screen of direct version of device driver will pop up

Select ltLocate and install driver software (recommendedraquo

Found New Hardware --

It takes longer searching depends on usage environment

When next screen pops up select ltI dont have the disc Show me other options gt

V GU middotJ~middott1h-c li~( (-lj11l~i ~lrl )1_1 Jmiddoti~t in~cmiddott i nc ll~i~ middot1 cttJ~middotrmiddot~~i~Jly

~t3(h th- (11( fjr Irimiddot ~r ~Jlt~rr

Message shows Windows couldnt find driver software for your device but select ltBrowse my computer for driver software (advanced) gt

-gt Check for u solution Viird) I iii h~d 10 ~ if lilff eft itltE GIJ (an tck 10 gd you Gbl(t

middotmiddotcrkl

~ BLGwe my cornputer for driler sofwlareadvaiCed) Lo~atc m in~LJII driver ~~fbJrc mJnu~lly

Cancel

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 11: USB Driver Instruction Manual

When next screen pops up select ltI dont have the disc Show me other options gt

V GU middotJ~middott1h-c li~( (-lj11l~i ~lrl )1_1 Jmiddoti~t in~cmiddott i nc ll~i~ middot1 cttJ~middotrmiddot~~i~Jly

~t3(h th- (11( fjr Irimiddot ~r ~Jlt~rr

Message shows Windows couldnt find driver software for your device but select ltBrowse my computer for driver software (advanced) gt

-gt Check for u solution Viird) I iii h~d 10 ~ if lilff eft itltE GIJ (an tck 10 gd you Gbl(t

middotmiddotcrkl

~ BLGwe my cornputer for driler sofwlareadvaiCed) Lo~atc m in~LJII driver ~~fbJrc mJnu~lly

Cancel

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 12: USB Driver Instruction Manual

When next screen pops up insert an attached CD-ROM to a PC and select the inserted CD-ROM

drive on ltBrowsegt

Remove the check mark from ltInclude subfoldersgt Click next

Found ~JEW Hardv~are- co Seriese -~~ _~~-~5~j-- - - --~ middot~~~h~-~ ~~~

Remove check mark

Select CD-ROnt1 drive

Search for selected CD-ROM drive

Sea rCIli1g F fo 1- softwa re

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 13: USB Driver Instruction Manual

I

When finding driver switch the screen and continue installing

It may take longer time searching virtual Com port depending on your usage environment

r~ Windows Securitymiddot

tJ Windows cant verify the publisher of this driver software

~ Dont install this driver sofhvare leu ~heuld ch~ck yeur manufactlJrlr~ h~bit~ fer updated driv~r ~eftwar~

fer your devie e

bull~ InstaH this driver sofrvare anYvoay Only imtall driver software obtained from your manufacturers website or disc Unsigned software from other ourees may harm your computer or steal information

i v See Qetail~

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 14: USB Driver Instruction Manual

When end screen displays the installation of direct version of device driver is completed Click

ltClosegt

liinccmiddotmiddot has finishEd imtaln~ thE clriitr scfthar fer thi dEicE

L1ATSUSDA PRECISION USB [10DULE

After completing the installation of direct version of device driver the installation of virtual Com port

version of device driver starts

It may take longer time searching virtual Com port depending on your usage environment

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 15: USB Driver Instruction Manual

In the same way for the instillation of virtual Com port select lt dont have the disc Shows me

other options gt and ltNextgt

If ycu haie the dl~c that came 81th ycur deicE imEt it nc inclc~ fill autl11atical~

earch the c1ic fer driier dtare

~ I dOlt lae tle disc Sho~v me otler opti01S ~

j

~-I I Cancel ~

Message shows ltWindows couldnt find driver software for your devicegt but select ltBrowse my

computer for driver software (advancedraquo

WindO1NS couldrlt find driver softvltJare for vour deice

-) ltrleck for a solution Nindow gt ill check to SEe if thEre arE teps ycu can ta ke te get ycur delice Icrking

- Browse my computer for driver softNare (addmiddotlCed) Locate and install driver software manually

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 16: USB Driver Instruction Manual

When next screen displays insert the attached CD-ROM to computer and select the inserted COshy

ROM drive onltBrowsegt

Remove the check mark fromltlnclude subfoldersgt Click ltNextgt bottom

Select CD-ROM drive

Remove check mark

~---l ---lI Ntxt - I CanCf ~

--~ middot~~Ji1nW7J~~~I~f~1I-middotr-middotmiddotFV-I

Search indicated CD-ROM drive

Searcnig F for 5oftvare

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 17: USB Driver Instruction Manual

When finding driver switch the screen and continue installing

Found New HardNare- USB Serial Pori _~middot_middot~middot1~~ - _ 0 - ~--yjfgtj~L~-

fmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddotmiddot - --bullbullbullbull

~ Dont install this driver sofnvare You ~hculd chedyour rnanufacturer~ middotieb~ite fer updated driver ooftNare for your demiddotmiddotjice

~) lnstalJ t1is driver softlvare anyway Only install driver softvvare obtained from your manufacturers website or disc Unsigned software from other sources may harm your computer or steal information

v See getail~

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 18: USB Driver Instruction Manual

When end screen displays the installation of virtual Com port version of device driver is completed

Assigned Com port number on virtual Com port is indicated as installed driver name Click ltclosegt

Found New Hardwar MAT5USADA PEECISION USB MODULE(CO~M) - -~i~~ki~fgt~middot~~~middot-srmiddot middot~lt~middotmiddotmiddot~~~~ttt~~fjt~~L-i~~~1irj~~l-i~~~~ ~~~)~-~cmiddot-middotmiddot ~gt

- jtt-SLai~(

Assigned Com port 1 c--s hac finihec1 instaling the c1ri-e1 dtarE fcr thi cJEvicE

number 1 i -1 T5U5ADA PEECI5IOr-) USB rIODULE

middotmiddotmiddotrmiddotj middotll-- )X)middottiJ-rmiddot

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 19: USB Driver Instruction Manual

2 -4 Installation of driver (Windows 98SEMe)

There are D2XX (Direct version of device driver9NCp (virtual Com port version of device driver)

in 98Me folder on MTP USB Driver Disk

Alternative of Direct version of device driver or Virtual Com port version of device driver can be

installed Select either version depends on your usage environment

As installing direct version of device driver message [Cannot find file name of ftd2xxcat] might

be appeard on the display however you can skip it since file [ftd2xxcat] is not used

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 20: USB Driver Instruction Manual

2 - 5 In case not able to install Click lt Add Hardwaregt in control panel to install the driver

iiJ1 Help 2rd upport

Ede ~dlt llJew F9vontes Iools tielp

poundshySearch

0 Control Panel

L~-i- -l ~-- r wJlt~ I

~ --I _J

Accessibility Add or Administr atve Date and Time Display Options Remov Toots

I i 1

-J~ ~iJ~~J--shy +-~See Also

Folder Optiuns Fonts Game Internet Keyboard ~louse

) Iiindos Update Controllers Options

1 ltr~ -J I ~~- - ~ Network Phone and Power Options Printers and Regional and Scanners and

Connections Modem Faxes Language Cameras

t

I ~ ) J Lii ~ ~ _c IfA-J ~

Scheduled Sounds and Speech System Taskbar and User Accounts Tasks Audio Devices Start Menu

2 - 6 Confirmation of virtual Com port number

Confirm or change virtual Com port number from device manager

~J~1 ~ =lQJB

[~~~~1J=~~~T~iTI-L~_~_jl~~~ plusmn y DVDCD-ROM drives

plusmn ~3 Floppy disk controllers itmiddot8 Floppy disk drives

t IDE ATAAT API controllers plusmn ~ Keyboards

ct S) Mice and other pointing devices

plusmn ~ Monitors

plusmn ~ National Instruments GPlB Interfaces

plusmn 11 Network adapters

-=-jJ Ports (COM amp LPT)

) Communications Port (COMt)

y Communications Port (COM2)

j ECP Printer Port (LPn)

f jrdei~UinBilfltilm~nGltIiiE+lndplusmn-t SCSI and RAID controllers

poundqimiddot Sound Video and game controllers

ct ~ System devices S ~ Universal Serial Bus controllers

jIntel(R) B2801BABAM USB Universal Host Controller - 2442

Intel(R) 82B01BABAM USB Universal Host Controller - 2444 bull bull MATSUSADA PRECISlON USB MODULE

USB Root Hub

_~~~~~~=~~~~~]

r------USB Root Hub-~-----~- ------------------------- shy

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 21: USB Driver Instruction Manual

3 Sanlple program

In sample folder executable file of communication program of direct version and

VBNC++60(MS)

Regarding details of function see the [D2XXPG34pdn progr2mming guide on an attached CDshy

ROM

3 -1 Direct version executable file of communication program

Windows shown below shall be open when execute the executable file USBtestexe in sample

folder

This USBtestexe is an executable file compiled sample program source code in VC folder in

enclosed CD-ROM Use this program to verify the communication between Matsusada power

supplies

Note that the operation verification of these executable program USBtestexe was done in the

environment of our factory and not to confirm the operation in any environment and as such

support on this program is not to be provided Indemnification is not to be provided either for any

damaged caused by using or diverting this program

[Start-up window]

Vvr ite Data I Data Send box

Read Data I ~------ Data receive box

~~--O------------7-A~-r-- Status display of program

Status middotIritialize EndJ~~_----~~-2i~--~r-== ~~~ ~~~~~

[Operation when sending data]

~ad

-----------------~------

Read~at~J -- --shy --~--

Status

Input a command (REN remote enable command)

Refer the Command List in our instruction manuals

for other digital communication commands

Click on Write button (input command is to be sent)

Status of command send is displayed

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 22: USB Driver Instruction Manual

[Operation when receiving data]

Jirite Data RT~ltiiiiiiiiiiiiO~==--~ Input a command (STS receive status of power supply)

When receiving input commands for read out

Read Data

Click on Write button (input command is to be sent)Status )Write OK ~--gtcJ~

Status of command send is displayed

Click on Read button (receive data which power supply

return from input command)

Received data is displayed

(CO RM CC receive status of power supply)

CO Output enable statusRM Remote controlCC

CC operation

Status of command received is displayed

3-2 Sample program with Visual Basic 60

Sample program is on the attached CD-ROM The sample of Visual Basic is located at VB folder

in sample folder on the CD-ROM

Project1exe in VB folder in the CD-ROM sample folder is an executable file compiled sample

program source code in VB folder This program operate just as USBtestexe does described in

previous page but when used with only this program VB60 run time library shall be required

~_~-~ ~~gt~~--- ~_~~) ~-~- Tmiddotmiddot~middot ~ - -- ~~f-gt~~middotlt----~~ _~~~~~lt lt~ -- bull bull _~ ~ ~ bull ~ bullbullbullbullbull - _ bullbull ~ ~--~-gt bullbull -

IlIite Data I

Form Form1 ~ ~- ~- -- ~middotlt~~middotr~ -~

bull ~ -- bull co ~ bull

Ilk ite

Status

Head Data fic505FRUM1iC5iCS-~~==~CJ

Write Data ISTS

middot _ - ~

Status

Write

middot ~ -- - -

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 23: USB Driver Instruction Manual

Private Declare Function FT_Open Lib FTD2XXDLL (ByVal intDeviceNumber As Integer ByRef IngHandle

As Long) As Long

Private Declare Function FT_OpenEx Lib FTD2XXDLL (ByVal pArg1 As String ByVallngFlags As Long

ByRer IngHandle As Long) As Long

Private Declare Function FT_Close Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Read Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesReturned As Long) As Long

Private Declare Function FT_Write Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IpszBuffer As String

ByVal IngBufferSize As Long ByRef IngBytesWritten As Long) As Long

Private Declare Function FT_SetBaudRate Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngBaudRate

As Long) As Long

Private Declare Function FT_SetDataCharacteristics Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

byWordLength As Byte ByVal byStopBits As Byte ByVal byParity As Byte) As Long

Private Declare Function FT_SetFlowControl Lib FTD2XXDLL (ByVal IngHandle As Long ByVal

intFlowControl As Integer ByVal byXonChar As Byte ByVal byXoffChar As Byte) As Long

Private Declare Function FT_ResetDevice Lib FTD2XXDLL (ByVal IngHandle As Long) As Long

Private Declare Function FT_Purge Lib FTD2XXDLL (ByVal IngHandle As Long ByVal IngMask As Long) As

Long

Private Declare Function FT_SetTimeouts Lib FTD2XXDLL (ByVallngHandle As Long ByVal

IngReadTimeout As Long ByVallngWriteTimeout As Long) As Long

Private Declare Function FT_GetQueueStatus Lib FTD2XXDLL (ByVal IngHandle As Long ByRef

dwRxBytes As Long) As Long

Return codes

Canst FT_OK = 0

bull Word Lengths

Canst FT_BITS_8 = 8

Stop Bits

Canst FT_STOP_BITSJ =0

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 24: USB Driver Instruction Manual

Parity

Const FT_PARITY_NONE =0

Flow Control

Const FT_FLOVtNONE =ampHO

Purge rx and tx buffers

Const FT_PURGE_RX = 1

Const FTYURGE_TX = 2

FT_OpenEx Flags

Const FT_OPEN_BY_SERIAL_NUMBER = 1

USB Handle

Dim IngHandle As Long

middot Write Buffer 256 Byte

Dim strWriteBuffer As String 256

middot Read Buffer 256 Byte

Dim strReadBuffer As String 256

middot USB Open

Sub UsbOpen()

middot Open

If FT_Open(O IngHandle) ltgt FT_OK Then How to open the device when connecting only one our

product

If FT_OpenExCC0001001 FT_OPEN_BY_SERIAUIUMBER IngHandle) ltgt FT_OK Then

When opening the device while connecting

multiple our products (or only one is also possible) to

one PC

Write USB SIN on the place of C0001 001 which is

enclosed with (double quotation)

Either FT Open or FT OpenEx is to be used

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 25: USB Driver Instruction Manual

Exit Sub

End If

BaudRaie 9600bps Set

If FT_SetBaudRate(lngHancie 9600) ltgt FT_OK Tilen

UsbClose

Exit Sub

End If

8 data bits 1 stop bit no parity

If FT_SetDataCharacteristics(lngHandle FT_EITS_8 FT_STOP_BITSJ FT_PAF-iITY_NONE) ltgt FT_OK

Then

UsbClose

Exit Sub

End If

I no flow control

If FT_SetFlowControl(lngHandle FT_FLOW_NONE 0 0) ltgt FT_OK Then

UsbClose

Exit Sub

End If

50m second readwrite timeout

If FT_SetTimeoutsCingHandle 50 10) ltgt FT_OK Then

UsbClose

Exit Sub

I Rx Clear

End If

If FT_PurgeClngHandle FT_PURGE_RX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

I Tx Clear

If FT_Purge(lngHandle FT_PURGE_TX) ltgt FT_OK Then

UsbClose

Exit Sub

End If

End Sub

I USB Close

Sub UsbCloseO

FT_Close ClngHandle)

End Sub

USB Write

Function UsbWriteCdata As String) As Boolean

Dim wlen As Long

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 26: USB Driver Instruction Manual

_-=~_n=~~~~=-~~=~Y_-~_~~~_~~_~_~_-__~

wlen Len(data)

strWriteBuffer data

UsbWrite FT_Write(lngHandle strWriteBuffer wlen Ln)

End Function

USB Read

Function UsbRead(data As String n tv Integer) As Boolean

Dinl I As I_ong

UsbRead FT_Read(lngHandle strReadBuffer n I)

jf I gt0 Then

data Left(strReadBuffer I - 1)

Else

data

End If

End Function

Private Sub Command1_ClickO

Dim wdata As String

Dim Rt As Long

Label5Caption

wdata Text1Text amp Chr(ampHD)

Rt UsbWriteCwdata) Send command written in TextBox

If Rt FT_OK Then

Label5Caption Write OKI

Else

Label5Caption Write NG

End If

End Sub

Private Sub Command2_ClickO

Dim rdata As String

Dim Rt As Long

LabeI5Caption

Rt Usb Read(rdata 20) Receive data

Label3Caption rdata Indicate the data received

If Rt FT_OK Then

LabeI5Caption Read OKl

Else

LabeI5Caption Read NG

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 27: USB Driver Instruction Manual

End If

End Sub

Private Sub Form_LoadO

UsbOpen

End Sub

Private Sub Form_UnloadCCancel As Integer)

Dim I As Integer

UsbClose

close all sub forms

For 1= FormsCount - 1 To 1 Step-1

Unload Forms(I)

Next

End Sub

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 28: USB Driver Instruction Manual

3 - 3 Sample program with Visual C++ 60

The sample program is on the attached CD-ROM The sample of Visual C++ is located at VC

folder in sample folder on the CD-ROM

IDC_WriteData

IDC_ReadData

IDC_StatusData ~~a~us jEdit

~middot~middot~~~~~~~~~~~~~r~~~-~~ ~ ~ ~ ~ ~ ~ ite j Read

------ -~~~--

ftd2xxlib Link

ftd2xxh Include

public

FT_STATUS ftStatus

FT HANDLE fnHandle

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 29: USB Driver Instruction Manual

OnlnitDialogO

I II Form2tting II I I II I I II I I II I II I I I I III I11111 I I I I I I I 1 I I I I I I I I I I I I I I I I

ftStatus =FT_Open(O ampfnHandle) How to open the device when connecting only one our

product

ftStatus =FT_OpenExCC0001 001 FT_OPEtLBY_SERIAL_NUMBER ampfnHandle)

When opening the cevice while connecting

multiple our products (or only one is also possible) to one PC

Write USB SIN on the place of C0001001 which is enclosed

with (double quotation)

Either FT ODen or FT ODenEx is to be used if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Open OK )

else

SetDlgltemTextODC_StatusData FT_Open Error )

return TRUE

In case only 1 unit is used for all series use FT_Open (recommended)

(Even with FT_OpenEx if USB SIN is written it will work)

In case multiple unit is used

CO series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx (egC0001001)

Other series Write USB SIN in the place of C0001 001 which is enclosed with

(double quotation) of FT_OpenEx

eg RK series FT_OpenEx(RK001001

eg DRA series FT_OpenEx(DRA01001

eg XXXXX series FT_OpenEx(IXXXXX001

I I BaudRate 9600bps Set

ftStatus =FT_SetBaudRate(fnHandle 9600)

if (ftStatus = FT_OK)

SetDlgltemTextODC_StatusData BaudRate 9600bps Set )

else

SetDlgltemTextODC_StatusData FT_SetBaudRate Error )

FT_Close (fnHandle) I I End processing

return TRU E

I I 8 data bits 1 stop bit no parity

ftStatus = FT_SetDataCharacteristics(fnHandle FT_BITS_8 FT_STOP_BITS_1 FT_PARITY_NONE)

if (ftStatus = FT_OK) [

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 30: USB Driver Instruction Manual

1-=-~~~S-e-tD-I-gI~t-em-T-e-xt~(j-D-C-_-S-ta-t-u-s-D-at-a=--8~d-a-tab~it-s-1-s-t-o-p~b-it--no~jty Set7~

else

SetDlgltemTextODC_StatusData FT_SetDataCharacteristics Error n FT_Close (frHandle) End processing

return TRUE

no flow control

ftStatus = FT_SetFlowControICfnHandle FT_FLOW_NONE O 0)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData no flow control Set n

else

SetDlgltemTextODC_StatusData FT~SetFlowControl Error n FT_Close CfnHandle) End processing

return TRUE

SOm second readwrite timeout

ftStatus = FT_SetTimeoutsCfnHandle 50 50)

if CftStatus = FTOK)

SetDlgltemTextCIDC_StatusData SOm second readwrite timeout Set )

else

SetDlgltemTextODC_StatusData FT_SetTimeouts Error)

FT_Close CfnHandle) End processing

return TRUE

Rx Clear

ftStatus = FT_PurgeCfnHandle FT_PURGE_RX)

if CftStatus = FT_OK)

SetDlgltemTextODC_StatusData Rx Clear Set )

else

SetDlgltemTextODC_StatusData FT_Purge Error )

FT_Close CfnHandle) End processing

return TRUE

Tx Clear

ftStatus = FT_PurgeCfnHandle FT_P~U--R~G~E_~T~X0) _

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 31: USB Driver Instruction Manual

~~~ ~~~o7~~~_~~~~~~~~ ~ _

if CftStatus = FT_OK) (

SetDlgltemTextODC_StatusData Tx Clear Set )

else

SetDlgltemText(IDC_StatusData FT_Purge Error 1)

FT_Close (fnHandle) I I End processing

return TRUE

SetDlgltemTextODC_StatusData Initialize End n I I Formatting up to here 1111III I I I III II II I I I I I I 111II I II II I II I I1I I 1111

1----------------------------------------------------------------------------- shy

I I Writing data

void CUSBtestDlgOnWriteO

CString strData

char data[256]

DWORD I

unsigned long len

GetDlgltemTextODC_WriteData strData) I I Obtain word of Writedata

strcpyCdata strData) 1 CString-+char

len =strDataGetLengthO 1 Obtain length of word

data[len] = OxOD 1 CR at the end of word

ftStatus FT_WriteCfnHandle data len + 1 amp1) 1 Writing data

if CftStatus = FT_OK)

SetDlgltemText(IDC_StatusData Write OK )

else

strDataFormatCWrite Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 32: USB Driver Instruction Manual

~_~~~wV~=I-=Il~~~-=--=~=~~~=~_~~~~~~_~~_~__ ~__ Read in data

void CUSBtestDlgOnReadO

CString strData

char data[2561

DWORD

ftStatus =FT_Read(fnHandle dcta 20 amp1)

if (ftStatus == FT_OK)

SetDlgltemTextODC_StatusData Read OK n

else [

strDataFormatCRead Error No d ftStatus)

SetDlgltemText(IDC_StatusData strData)

if (I ) 0) I strDataFormatCs data)

SetDlgltemTextODC_ReadData strDataLeft(l)

else

SetDlgltemText(IDC_ReadData )

)

Read in data

I In case word returned

1 char-CString

1 Description of word to Read data

------------------------------------------------------------------------------

OnCancelO

FT_Close (fnHandle)

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)

Page 33: USB Driver Instruction Manual

---~--~-----__-----__---------------------

Matsusada Precision Inc USA Canada Mexico

West Coast San Jose office +1-408-273-4573 CentralMid West Dallas office +1-972-663-9336 East Coast New York office +1-631-244-1407

middotContact to above offices if any question or inquiry

(English Voice mail available)

Other countries International office(Japan) +81-75-229-6355 (English or Japanese no voice mail)

Headquarters Factory 745 Aoji-cho Kusatsu Shiga 525-0041 Japan Tel +81-77-561-2111 (English or Japanese no voice mail)