Canon manual RE-350 32bit Sample Code \32BITSDK, Execute an RE-350 command

Page 63

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

Notes:

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

2)The RE-350driver (RE350.DLL) is located in .\EXAMPLE\RE350 and has been setup as a sub-project of EXAMPLE. It will be automatically updated if EXAMPLE is set as the project. The output is directed to the EXAMPLE\RELEASE directory so any changes made to the DLL will be automatically loaded by the application next time it is run.

EXAMPLE explicitly loads and unloads the DLL using LoadLibrary() and FreeLibrary() to facilitate this (see

EXAMPLE.C).

3)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 dipswitch 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.

This product is provided AS IS. For questions regarding product operation contact Canon Information Technology Services at 1-800-828-4040

All rights are reserved. No part of this document may be photocopied, reproduced, translated to another language, stored in a retrieval system, or transmitted in any form without the prior written consent of Canon U.S.A., Inc.

The information contained in this document is subject to change without notice. Canon U.S.A., Inc. makes no warranty of any kind with reguard to this written material. Canon U.S.A., Inc. assumes no responsibility for any errors that may appear in this document or for incidental or consequential damages in connection with the furnishing, performance or use of this manual.

Canon is a registered trademark of Canon, Inc. ©1996 Canon U.S.A., Inc. 11.13.96

All trademarks and registered trademarks are the property of their respective owners.

63

Image 63
Contents RE-350 Control Interface Command Index Operations and Functions Panel DiagramsDescription of the Front and Rear Panel Functions Key FunctionButton Detail Button Control Knob Digital Switches Main power is turned onPower supply SCp180 Operations RE-350s Condition and LED Status Operational Procedures OverviewOperations RS-232 LED remains on RE-350will operate according to the givenAvailable Front panel PC and the RS-232 LED will blinkMode Meaning Adjusting the value of each control knobSetting the center target value for Auto-White Balance Function of RS-232 button LineRequest on LineLineRequest OFF Line Status Default Setting of Each Function After Power-OnAuto-white balance was adjusted successfully Meaning of Each LED StatusParameter Control ProtocolPacket Discrimination Code Assignment ID numberEvent Data Packet Format PC RE-350 Data Packet ConfigurationControl Command Packet Format PC RE-350 Response Data Packet Format PC RE-350Response Flow Pattern 2 Event Packet Flow Pattern Operational Flow ChartFlow Pattern 1 Command Communication Flow Pattern CommandFlow Pattern 3 Notification Mode Flow Pattern FP Data PacketResponse data Camera Control Commands Table Control Command and Packet TablesLED System Control Commands TableResponse Data Packet Table System error responseMode error response Time out error responseRequest on line Event Data Packet TableEvent Description Byte Header ID # ParaLDenied AcceptedFP Data Packet Table FP data description ByteParaH ParaL $10 $ 0 Description Command Data PacketZoom Commands Wide Zoom Constant SpeedTele Zoom Step Tele Zoom Constant SpeedZoom Stop Zoom Access To PositionZoom Request Position Zoom Tele Constant Speed w/ AF † Zoom Wide Constant Speed w/ AF †Focus Near Constant Speed Focus CommandsOP AF Operate Auto Focus $10 $ 1 $ 0Focus Near Step Focus Far Constant SpeedFunction Focus Stop Focus Far Step$10 $ 2 $ 0 White Balance CommandsWhite Balance Manual Access To OP AWB Operate Auto-White BalanceExposure Commands Exposure Manual Access To$10 $ 2A $ 0 Detail Manual Access To Detail Commands$10 $ 3 $ 0 Positive/Negative CommandsSet Positive Mode † Set Negative Mode †$10 $ 4 $ 0 Color/B&W CommandsSet Color Mode Set B/W Mode$10 $ 5 $ 0 System Control CommandsDetailed System Control Commands Select Document VideoDocument Lights Off † Document Lights On †Backlight Off † Backlight On †$10 $ 6 $ 0 LED NormalLED On $10 $ 6 a $ 0 LED Off$10 $ 6 B $ 0 LED BlinkOFF-LINE Mode ON-LINE Mode$10 $ 7 $ 0 Notification Mode $10 $ 8 $ 0 Maximum operation time msec 100 millisecond Command formatStatus of Group a Video C/M= on Status of Group BInput Function To get the status data of Group B from the RE-350Backlight Status of the ButtonsFocus Input RS-232 AutoStatus of WB control knob Status of EXP control knobParameter of the C-response Packet MSH $00 fixed Status of Detail control knob Status of AWB resultFunction Gets the position data of the Detail control knob Name of the Equipment Version of ROMParameter of the C-response Packet $10 $F F $ 0 Set to Special Mode$10 $F F $ F F Set to Service ModeRS-232C Control Cable Pin Assignment Control Cable Pin AssignmentsRE-350 RE-350 Control Cable Pin Assignments Pin Dsub RS-232CPage Mark Duration period Min Max 300ms 200ms 10ms T4-T2 Timing ChartsRTS/CTS Flow Control Timing Chart Command58ms 300ms 1000ms 200ms RTS flow control timing chartMark Duration period Min Max 44ms 300msAppendix a Disk Information RE-350 Software Developers Disk InstallationRE-350 SDK File Definitions RE-350 Demo Application \APPClose communications with the RE-350 Execute an RE-350commandRE-350 16bit Sample Code \16BITSDK Initialize communications with the RE-350RE-350 32bit Sample Code \32BITSDK Execute an RE-350 command
Related manuals
Manual 4 pages 50.01 Kb