Canon manual RE-350 16bit Sample Code \16BITSDK, Initialize communications with the RE-350

Page 62

RE-350 16bit Sample Code (\16BITSDK)

Notes:

1)This example application was written and compiled with Microsoft C/C++ and SDK Version 1.52 (16 bits ONLY). Open the project in Microsoft Visual C/C++ to edit and recompile.

The DLL and example application are built separately. You can use RE350DLL.DLL as is by importing the functions described below (or in RE350.H).

You can also rebuild the application in MS-DOS by typing: nmake -fre350dll.mak

nmake -fexample.mak

2)RE350.C and RE350.H constitute the basic driver and are generalized to work with any application. All of the functions return an error code (defined in RE350.H) to indicate whether the operation was successful.

Initialize communications with the RE-350:

int FAR PASCAL

RE350_Open( int iComPort )

int iComPort:

RE350_COM1-RE350_COM4

Execute an RE-350command:

int FAR PASCAL

RE350_Command( int iDevice, int nCmd, WORD wRequest, LPWORD lpwResponse );

int iDevice:

device 0-3 (check dip switch on the back)

int nCmd:

Command defined in RE350.H.

WORD wRequest:

Request data if required by command.

 

(Use RE350_NULL_REQUEST if not required).

LPWORD wRequest:Pointer to response (or NULL).

Close communications with the RE-350:

VOID FAR PASCAL

RE350_Close( VOID );

4)EXAMPLE.C is a simple application which demonstrates the operation of the driver. After getting this to compile in your environment, you can add additional commands (via RE350_Command) to test the camera’s operation.

All of the RE-350commands are implemented through this function.

62

Image 62
Contents RE-350 Control Interface Command Index Panel Diagrams Operations and FunctionsButton Description of the Front and Rear Panel FunctionsKey Function Detail Button Power supply Control Knob Digital SwitchesMain power is turned on SCp180 Operational Procedures Overview Operations RE-350s Condition and LED StatusOperations Front panel PC and the RS-232 LED will blink RE-350will operate according to the givenAvailable RS-232 LED remains onSetting the center target value for Auto-White Balance Mode MeaningAdjusting the value of each control knob LineRequest OFF Line Function of RS-232 buttonLineRequest on Line Meaning of Each LED Status Default Setting of Each Function After Power-OnAuto-white balance was adjusted successfully StatusID number Control ProtocolPacket Discrimination Code Assignment ParameterResponse Data Packet Format PC RE-350 Data Packet ConfigurationControl Command Packet Format PC RE-350 Event Data Packet Format PC RE-350Command Operational Flow ChartFlow Pattern 1 Command Communication Flow Pattern Response Flow Pattern 2 Event Packet Flow PatternResponse data Flow Pattern 3 Notification Mode Flow PatternFP Data Packet Control Command and Packet Tables Camera Control Commands TableSystem Control Commands Table LEDTime out error response System error responseMode error response Response Data Packet TableParaL Event Data Packet TableEvent Description Byte Header ID # Request on lineAccepted DeniedParaH ParaL FP Data Packet TableFP data description Byte Wide Zoom Constant Speed Description Command Data PacketZoom Commands $10 $ 0Tele Zoom Constant Speed Tele Zoom StepZoom Access To Position Zoom StopZoom Request Position Zoom Wide Constant Speed w/ AF † Zoom Tele Constant Speed w/ AF †$10 $ 1 $ 0 Focus CommandsOP AF Operate Auto Focus Focus Near Constant SpeedFunction Focus Near StepFocus Far Constant Speed Focus Far Step Focus StopOP AWB Operate Auto-White Balance White Balance CommandsWhite Balance Manual Access To $10 $ 2 $ 0$10 $ 2A $ 0 Exposure CommandsExposure Manual Access To Detail Commands Detail Manual Access ToSet Negative Mode † Positive/Negative CommandsSet Positive Mode † $10 $ 3 $ 0Set B/W Mode Color/B&W CommandsSet Color Mode $10 $ 4 $ 0Select Document Video System Control CommandsDetailed System Control Commands $10 $ 5 $ 0Document Lights On † Document Lights Off †Backlight On † Backlight Off †LED Normal $10 $ 6 $ 0LED On LED Off $10 $ 6 a $ 0LED Blink $10 $ 6 B $ 0$10 $ 7 $ 0 OFF-LINE ModeON-LINE Mode Notification Mode Video C/M Maximum operation time msec 100 millisecond Command formatStatus of Group a $10 $ 8 $ 0Function To get the status data of Group B from the RE-350 Status of Group BInput = onInput RS-232 Auto Status of the ButtonsFocus BacklightParameter of the C-response Packet MSH $00 fixed Status of WB control knobStatus of EXP control knob Function Gets the position data of the Detail control knob Status of Detail control knobStatus of AWB result Parameter of the C-response Packet Name of the EquipmentVersion of ROM Set to Special Mode $10 $F F $ 0Set to Service Mode $10 $F F $ F FControl Cable Pin Assignments RS-232C Control Cable Pin AssignmentRE-350 Control Cable Pin Assignments Pin Dsub RS-232C RE-350Page Command Timing ChartsRTS/CTS Flow Control Timing Chart Mark Duration period Min Max 300ms 200ms 10ms T4-T244ms 300ms RTS flow control timing chartMark Duration period Min Max 58ms 300ms 1000ms 200msRE-350 Software Developers Disk Installation Appendix a Disk InformationRE-350 Demo Application \APP RE-350 SDK File DefinitionsInitialize communications with the RE-350 Execute an RE-350commandRE-350 16bit Sample Code \16BITSDK Close communications with the RE-350Execute an RE-350 command RE-350 32bit Sample Code \32BITSDK
Related manuals
Manual 4 pages 50.01 Kb