VIDEO RECOGNITION SYSTEM
A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by any one of the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.
MICROFICHE APPENDIX
A microfiche appendix of a computer program having four pages of microfiche with a total of 216 frames constitutes part of the specification of this invention under 37 C.F.R. 1.77 and 1.96.
TECHNICAL FIELD An image processing engine interfaced with a color camera is used to inspect product packaging and for identifying and counting products for quality and inventory control.
BACKGROUND OF INVENTION
An automated system for inspection of hot-fill juice bottles is described in an article appearing in Packaging World dated September 1996. A Model 51R41 Vision System from White Cap of Downers Grove, Illinois includes a monochrome camera and lens, video monitor, real-time processor from Allen-Bradley of Milwaukee, Wisconsin, a computer and mouse. The system detects bottle fill height, closure application, and the presence or absence of a cap liner and tamper-evident neck band.
As filled and capped bottles pass the vision system, mounted above a conveyor, a photo eye detects bottle presence. A monochrome video camera and 55mm lens acquire an image of the bottle. A strobe provides a light. Once the strobe fires, the camera sends an image to the Allen-Bradley processor for inspection.
The processor compares the image with acceptable parameters established by the user, to make accept/reject decisions for each bottle size and product flavor. The system is described as using the neck of the bottle as a reference point permitting inspection for cocked or missing caps, how far the cap is torqued on, the presence, absence or damage to a cap liner, or tamper-evident band. The system is further described as being capable of determining the lightness or darkness of pixels within an image to help determine fill heights. With apple juice, for example, which is light in color, more light will shine through the bottle, so that represents a different set of pixels than cranberry juice.
Monochrome images consist of one color and different colors appear as shades of gray. Problems are encountered in attempting to adapt systems using monochrome video cameras for inspecting opaque objects through which light does not shine. For example, for determining whether or not a twist tie on a bread wrapper is properly positioned and tied.
If a loaf of sliced bread is moving through a tying station, for example as disclosed in
U. S. Patent No. 5,483,134, issued January 9, 1996 entitled RIBBON SENSING DEVICE FOR BAG TYER and a heel on the loaf of bread falls down into the neck of the bag, the tying device will attempt to gather the neck of the bag around the heel and tie a closure around the neck of the bag.
Product identification presents special problems when color is a primary distinction between different products. If the only difference in the appearance of two products is the difference in the color of a band on each product, monochromatic systems, which are color blind, encounter difficulty. A red band on one product and a green band on a different product appear to be identical.
£
SUMMARY OF INVENTION
The video recognition system includes a hood assembly for controlling ambient light adjacent a package moving therethrough and supports a color video camera and a strobe light. The video camera and strobe light are connected to an image processing engine and a user interface for digitizing analog video signals from the camera for comparison with data relating to stored images for determining whether or not a closure is properly positioned on the package for quality control. The collected data is also compared with stored data for inventory control.
A computer-implemented method for inspecting a closure on a package is also provided with the steps of establishing a plurality of areas of interest on an image of a package, at least one of said areas of interest framing at least a portion of the closure; acquiring an image of each package and comparing data in the predetermined areas of interest of each package with data learned from areas of interest of a previous package; and indicating when a package fails.
DESCRIPTION OF THE DRAWINGS Drawings of a preferred embodiment of the invention are annexed hereto, so that the invention may be better and more fully understood, in which:
Figure 1 is a front elevationai view of a hood assembly of the video recognition system; Figure 2 is a side elevationai view thereof;
Figure 3 is a top plan view; Figure 4 is a diagrammatic view of an imaging unit;
Figure 5 is a screen display representing a captured of a captured pixel image with selected area-of-interests; Figure 6 is a screen display representing the RGB value statistics measured from a captured pixel image and an amount of RGB deviation with respect to a reference pixel image; and
Figure 7A-7C is a flow chart setting out the process carried out by the invention in processing pixel images. Numeral references are employed to designate like parts throughout the various figures of the drawing.
DESCRIPTION OF A PREFERRED EMBODIMENT
Referring to Figures 1-3 of the drawing the numeral 10 generally designates a hood assembly mounted over a conveyor C that moves loaves of bread or other packages P through hood assembly 10. Hood assembly 10 comprises a rear wall 12, spaced end walls 16 and 18 and a top wall
19. Access door 22 is connected by a hinge 21 to the upper end of rear wall 12. In the illustrated embodiment, top wall 19 and front wall 20 are joined to form an access door 22. Front panel 20 forms a cover that is movable between open and closed positions for providing access to the interior 24 of hood assembly 10. As illustrated in Figures 1 and 2 of the drawing, the lower edge 14 of rear wall 12 and the lower edge 23 of front panel 20 are spaced above lower edges of end walls 16 and 18 and above conveyor C for forming an entrance passage 15 and discharge passage 25 below rear wall 12 and access door 22. As package P is carried by conveyor C, it is moved through entrance passage 15 into the interior 24 of hood 10 and subsequently through discharge passage 25.
A strut 28 having mounting plates 27 and 29 on opposite ends thereof is mounted in the interior 24 of hood 10 and mounting plates 27 and 29 are bolted or otherwise secured to end walls 16 and 18.
In the embodiment of the apparatus illustrated in Figures 1 and 2 of the drawing, a video camera 30 is mounted on a generally vertical leg 34 of an angle member 35 and a strobe light 40 is mounted on a generally horizontal leg 36 of angle member 35. The central axis C„ of camera 30 and the axis Sa of strobe 40 are generally parallel and angle member 30 is vertically adjustable relative to strut 28 for positioning video camera 30 and strobe light 40 a predetermined distance from package P. Hood assembly 10 is preferably formed and positioned to reduce ambient light adjacent package P until strobe light 40 is fired to illuminate package P while video camera 30 is operating. Strobe light 40 preferably remains illuminated for example about 20 milliseconds for "freezing" the image captured by video camera 30 even though package P is moving through the interior 24 of hood assembly 10 on conveyor C. A power supply 42 is connected through suitable conductors (not shown) for powering video camera 30 and strobe light 40.
An interface connector board 45 is secured by screws 46 to rear wall 12 of hood assembly 10. A status indicator 50 is mounted on end wall 18 in the illustrated embodiment
of hood assembly 10. Status indicator 50 is mounted on the upper end of a rigid conduit 51 and preferably includes a plurality of indicators 52, 54 and 56 for indicating various conditions. For example, indicator 52 is preferably a green light indicating that the package is properly tied. Indicator 54 is preferably a yellow light indicating that the tie on package P is marginal while indicator 56 is a red light indicating that the tie on package P is not satisfactory and that the tying process has failed to meet specified standards. The indicator 50 may include audible as well as visual indicators and may be connected with associated equipment to adjust the speed of conveyor C or to actuate gates (not shown) on the conveyor for diverting defective products from conveyor C to a holding area. Referring to Figure 4 of the drawing, the numeral 60 generally designates an image processing engine for the package recognition system. It interfaces with the camera 30 for acquiring images of package P.
In the illustrated embodiment the image processing engine 60 includes a conventional personal computer 62 having, for example a 5x86-100 MHz microprocessor with 16 megabytes of random access memory ("RAM") and a 1 Gigabyte hard disc drive for storing data A suitable 5x86 microprocessor is commercially available from Intel Corporation under the trademark Pentium.
A high speed video capture card 65 is connected through a high-grade video cable 64 to a CCD ("Charge Coupled Device") video camera 30 for delivering analog RGB ("red, green and blue") video signals from camera 30 to the video capture card. The video capture card 65 records a displayed image from camera 30 and stores the recorded image as information in computer memory in digital (bit) form. A suitable video capture card 65 is commercially available Insync Technologies, Inc. of San Leandro, California under the model number 734/744 PCI. The video capture card allows capture, editing and play back of RGB digital video images. It is capable of taking a snapshot of the color image delivered from the video camera 30 in 16.8 million colors.
An interface is provided by a conventional digital input output ("CIO/DIO") board 68 electrically connected through a cable 67 to a data translation board 70 on interface connector board 45. A plurality of relays 71, 72 and 73 are mounted on interface connector board 45 for actuating strobe 40, status indicator 50 and product sensor 75.
Product sensor 75 may assume a variety of configurations for indicating that a package P has reached a predetermined position. In a preferred embodiment of the invention, proximity sensor 75 transmits a beam of light. Product sensor 75 is preferably a proximity
.
indicator including a transmitter 76 and receiver 78, one positioned on each side of conveyor C. When package P breaks a light beam between the transmitter 76 and receiver 78, a signal is delivered through conductor 72a to relay 72 on interface card 40 which results in signals being sent to trigger strobe head 40 to trigger a flash and take a picture simultaneously. Every time a package P passes adjacent product sensor 75, a picture or pixel image is taken of the package P. The strobe 40 allows the video camera 30 to obtain a crystal-clear image even though package P is moving relative to camera 30.
Computer 62 preferably has an Ethernet adapter board 80 connected through a cable 82 to an Ethernet adapter card 84 in user interface 85. User interface 85 is preferably a personal computer 86 having a 5x86 processor running Windows95, Windows NT or
Windows 3.11. Computer 86 has a computer program that provides user interfaces, setup and configuration tools, data display and data export functions. One or more image processing engines 60 can be networked with computer 86 providing a high speed datalink. Computer 86 preferably includes a mouse or touch screen monitor used by an operator for designating area- of-interests (AOI) to be examined by the image processing engine 60.
One or both of the computers 62 and 86 is preferably equipped with a high speed modem fax card (not shown) for remote communication with other facilities using conventional communications standards set out by the CCITT ("Comite Consultatif Internationale de Telegraphie et Telephonie") such as V.32 modem communications. User interface unit 85 is connected through network cable 82a to additional image processing engines 60. Network communications between image processing engine 60 and computer 86 is carried out by a computer database resident on computer 86. Preferably, the computer database is embodied by Microsoft® Access. The image processing engine 60 and computer 86 operates in recognition or comparison modes. In recognition mode, the system operates by capturing images from the camera and placing them into the image processing engine 60 computer memory. Engine 60 then analyzes the pixel image stored in memory to extract information relating to the red, blue and green content values and their saturation. Information is also gathered as to the overall shape of the item in the image. This information is then compared against the same data collected from a reference pixel image stored in the database contained in computer 86. Once this comparison is completed, a match is selected based on statistical parameters which it most closely resembles. These results are then stored in the database for display and analysis by computer 86 (see Fig. 6).
(-5
In comparison mode, captured pixel images are compared against one standard image retrieved from a computer database or retrieved in "LEARN" mode. Comparison mode allows analysis of quantitative information such as container fill levels, size comparison, and can provide statistical and alarm information to the DCCS ("Data Collection and Control Software") in computer 86.
Referring to Figure 5 of the drawing a pixel image in a frame generally designated F is diagrammatically illustrated as it would be viewed on a computer monitor connected to computer 86 of the user interface unit 85. The operator defines a plurality of areas of interest designated AOI-1, AOI-2, AOI-3, AOI-4 and AOI-5 in Figure 5 of the drawing. Also in the display is the test status frame 102 of the analyzed product, and a good-tally frame 104 and a bad-tally frame 106. A screen selection frame 108 allows the user to select between different computer screens with different information displayed. A mode selection frame 110 allows a user to select the different operation modes "RUN " "STANDBY," "STOP," and "LEARN."
Different area-of-interests ("AOF') may be defined for accomplishing different functions. For example, multiple AOIs can be used to verify correct tying of the bag's neck, as shown in Figure 5. The AOIs are defined on a reference pixel image of the production lines goods, in this example, a loaf of bread. The product P shown in Figure 5 is a successive- product pixel image that is compared against the pixel information obtained from the reference pixel image. AOI-1 is defined around a centered-tie position of package P. AOI-2 and AOI-3 sandwich AOI-1. Thus, as defined about a reference image, AOI-1 contains the bag-tie T, and AOI-2 and AOI-3 are empty. AOI-4 is defined about the decorative mark which identifies the product. AOI-5 is defined about another mark which can identified the variety of goods, such as whether the bread is wheat bread or white bread. In Figure 5, the package P fails because the bag-tie is not centered, causing an RGB value deviation out of the RGB range for AOI-1 and AOI-3.
In general, the data obtained may be used for counting and recording information in an inventory control system or database to indicate the number of packages of each particular type of bread, buns, or other products that are routed to a racking area to be loaded on delivery trucks for delivery to retail establishments. A bakery manager will be able to maintain an accurate count of the specific items and number of items produced in a specified time interval for comparison with the type and number of items received by retail establishments for controlling inventory.
1
Referring to Figure 6, a statistics display screen 150 is illustrated. The statistics display screen displays the RGB statistics for the product P being analyzed in three fields:
AOI field 152, "Realtime RGB Values" field 154, and "Differential RGB Values" field 156.
In the example shown by Figure 6, the product has passed since it was within the differential value range as specified by tolerance field 158.
Other uses of the image processing engine 60 and computer 86 are available such as: confirming that product labels are applied and in the proper orientation, rejecting or rerouting those products improperly labeled; confirming that lids or package closures are in place and rejecting those packages improperly sealed; confirming that packing cotton is present in medicine bottles; measuring the dimensions of a package and rejecting those out of tolerance; confirming placement and contents of package items (for example, inspecting frozen food trays to confirm each item is in the proper place and there is no cross placement, i.e. no green beans in the corn tray); and measuring the quantity of liquids in a bottle and rejecting those that are over/under filled. Further uses are available for the image processing engine 60 and computer 86.
Referring to Figures 7A through 7C, shown is a software program flow chart comparing captured pixel images to a reference pixel image. The program is supplied in greater detail in the microfiche appendix, which is incorporated by reference herein.
The program has a setup portion, a data acquisition portion, and an analysis portion. The program in general is preferably generated with the VisualBasic computer language to take advantage of the Windows operating system environment. Other program segments can be generated with other high-level language to interface with peripheral devices such as the frame grabber 65 and strobe 40. A suitable high-level language is "C", Pascal, or the like. Compilers for these languages are commercially available. The imaging unit operates in two basic program modes. The first mode is the learning mode and the second mode is the analyze or run mode.
In the learn mode, interface unit 85 acquires pixel images each time the product sensor 75 indicates that a package P is present. Values of red, green and blue ("RGB values") in area-of-interests AOI-1 through AOI-5 are calculated and the data is stored in a table. While a single AOI pixel image will be sufficient for general applications under some circumstances, a plurality of images, for example ten, can be examined and stored in a computer memory table or database, and the average of the plurality of images can be used for comparison with an image captured of each successive product.
In the description of the program, each program event is identified with a numeral in parentheses. In Figure 7A, the setup portion of the program flow chart is shown. In the initialization step (202), memory storage arrays are defined, database files are constructed for receiving data information, and variables are initially defined. Also, the network interface link is established between image processing unit 60 that captures product pixel images and the
DCCS ("Data Collection and Control Software") computer 68 that analyzes the captured product pixel images and establishes an information database regarding the pixel images subsequently captured. The network interface link is established using the TCP/IP ("Transport Control Protocol/Interface Program") network standard. With respect to data acquisition and analysis, the program establishes a database file format, a preferred format being the database program Access, also available from Microsoft Corporation of Washington. With Access, data summaries and reports can readily be generated for the users convenience. Furthermore, such data is portable between other Microsoft® software products. Such portability is an aspect sought by the user. Microsoft® Access is a compatible database that allows a user to retrieve and prepare reports with most widely used software packages that are ODBC compliant.
Next, the program determines whether the user has selected the learn mode (204). If so, then the camera 30 (shown in Figure 4) captures an image of a product on the line (206) and displays the image (208). The captured image is stored in computer memory in digital (bit) form. Preferably, the captured image is stored in bit-mapped graphics format ("BMP").
This graphics format stores and holds the captured image as a collection of bits in computer memory locations corresponding to pixels on the monitor screen. This format is typical of paint programs, which treat graphics images as collections of dots rather than as shapes. With the computer's memory, the bit-mapped captured image is represented as an array or group of bits that describe the characteristics of the individual pixels or picture elements forming the image. Color bit-mapped graphics images, or pixel images, require numerous computer bits per pixel, each set of bits describing some aspect of the pixel's color. For example, a pixel image with depth of 8 bits uses 8 bits to describe the attributes such as color of each individual pixel on the screen. The user next defines the AOIs on this product image (210), therein defining the pixels of interest in the image and the pixel image portions, which are held in the computer memory, that are associated with pixel coloring. From the AOIs, the program determines an RGB
3
reference value (212) from the color information contained in the pixel image data structure, from which subsequent product images can be compared against (see Figure 6).
If the user did not select the learn mode (204), then the user is prompted to select a pixel image from a product database stored on the computer 86 and the image is retrieved (214). The image is displayed to the user on a computer monitor (216) in which default reference AOIs, with a default set of RGB averages, can be accepted or the user can designate their own AOI layout and the RGB averages are determined accordingly.
The RGB reference values or averages are displayed to the user on the computer monitor (218), shown in Figure 6. The user then selects the RGB tolerance value or accepts the default tolerance value (220). The tolerance value is the amount of deviation permissible for AOI acquisition data before a product "Fails" the comparison. For example, if the RGB value set is 220, 190 and 150 for a selected group of AOIs, a tolerance of 10 allows a range of
210 to 230 for red, 180 to 200 for green, and 140 to 160 for subsequent packages to "pass."
Referring to Figure 7B, the data acquisition portion of the program is illustrated. The program monitors when the product sensor 75 is triggered (222). When the product sensor 75 is triggered, the image processing engine 60 captures the pixel image of the product (224). From the pixel image, the RGB values of the active AOIs is determined and displayed (226), referring back to Figure 6. The inventory counter is incremented (228).
Still referring to Figure 7B, the data analysis portion is described, wherein the RGB values from the captured pixel image (224) is compared against the reference pixel image
(212, 216). If the RGB values are within tolerance (230), then the result is announced and stored in a database (232). The announcements are "PASS," "FAIL" and "MARGINAL," and are made on both monitor screen and status indicator 50. Status indicator 50 indicates "PASS" with a green light 52, "FAIL" with a red light 56, and "MARGINAL" with a yellow light 54, respectively. The program then returns to wait for another triggering of the proximity sensor (222).
If the RGB values are not within tolerance (230), then it is determined whether the RGB values are marginal (234). That is, a determination is made as to magnitude the RGB values are outside the tolerance value, which is a small percentage determined by the user. If the product is marginal, then the result is announced as marginal by lighting the yellow light on the status indicator 50 and accordingly stated on the monitor field 102 (see Figs. 5 and 6), and stored in the database as a marginal case (232). The program then returns to wait for another triggering of the proximity sensor (222).
If the RGB values are not within tolerance (230), then the program proceeds to determine whether the RGB values are within other product RGB values in a product database (236).
But, the program can terminate after step 234 and simply issue an error by announcing and storing a "fail" result in the database (232). But further advantages can be had be routing products to differing product loading areas, and this is an advantage seen by producing a further embodiment having product differentiation and identification. Thus, if the RGB values are within another product RGB values contained within a product database (236), then the product is identified (238) and further instructions are executed (242) if they exist (240).
If further instructions do not exist (240), then the imaging unit is in a quality inspection and inventory mode and returns to announce and store results in the database (232). Otherwise, if no other RGB values match (236), then the comparison fails. This result is announced and stored as such (232) and the program waits for another proximity sensor triggering (222).
It should be noted that the user has the option to exit out of the program at their convenience or to place the program into standby mode while an error is being corrected.
The embodiment shown and described above is only exemplary. Many details are often found in the art such as other forms of transducers and flow meters. Therefore, many such details are neither shown or described. It is not claimed that all the details, parts, elements, and steps described and shown or invented herein are invented herein. Even though numerous characteristics and advantages of the present invention have been set forth in relationship to a imaging processing unit and DCCS program, the foregoing description has application to other types of product identification and changes may be made in the detail especially in matters of shape, size, and arrangement of parts wherein the principles of the invention to the full extent indicated by the broad general meaning of the terms used in the attached claims. The restrictive description and drawings of this specific examples above do not point out what an infringement of this patent would be, but are to provide at least one explanation of how to make and use the invention. The limits of the invention or the bounds of the patent protection as measured by and defined in the appended claims.
~ΛΛ
β
::_> ;
.a
7 1
"s , '
"
t
^ -Y~
:.,
* - πko.'-:- ' l = 0 "Fu .
I dPic'-rcy
) fjrsC; ,; - Γ.^ F ?:"*.
7 - 4",2
3 sfl - 2-10
0 T hJ:x = 6
10 Tsxt •= T "
" 11 To? « 2640
•-12 Wiώ = 332
Vi
." I' )
-' 5
•»
Li-i
' * *
,"
l ".7a
:
' • ' i V _ /
Ib^tα- t ^ 2 'C ι τ o ' * Λ ^. * - 0 ?! t 3 " Q.l .• - .i'.' .eccco .
-
30 •'j 31 2-/n"V73 -Y ,lτ- z cΩ 32 \ 'p-;:'-"^ = 3 'FL-t
7 c'.C . :r -= ::i23^"C3:7 a CtyIj = 0 Trαns.-α.'--) t
33 Cφtbra = "AOI TJc'ttoπi-
F'reCr r - Λ:IOOFF?FFΓ~:
Ili'-^t = 192
Let = 2463
;39 TablrY. = 13
Top = 4023
"'41 Wi2ώ = 332 >c42 End -43 iZ'&VB. jl abellO
7-IIjsrr.or.t = 2 *Ce.ιt.r i A pκr .-Λ:. «= 0 TJat
ΓT&CCI - iH3nθυOC05.i
-• ,-Λ.rι. ' = 0 Tnnspεr" i
_cr*: u = "ΛOIBε-ik"
= ^ β. τHτC-»DτFrτF-τFrτFrT~F?i s
t
>
0
9 - 3C3
10
11
12 • = 2,1
13 / 'i - 33 ,
14
15 . -,- / ».'-• j "; i
15
17 ' Y r7/I i = 3
13 .'YCoIr = άK0CC:i Z'lD
19 .:.::;>'; = o •soi'j
20 •■ •777.t -= 3012
S.J . ^ i Y ^ '^ i - .. '..
27 !.r.-ι2j.cr — 7.fIC r ri" Y7
23 ' r!,t,V: It- 3
23 •T\7 ; - 71.3 ; ' <> -
30 ' Ii" > ; = J 'Z 'W
31 I ' • • - 2312
32 _Yt =* 53C0
33
21 ; o -- 1740
33 77- =• 4532
^ „ ^ O _ .1
43 - ι_ .πi i i -. » 3' *
-a ('.,•
1 -,y • . v 7/07 J. ; '..„;; ?
".•• U.-7t-V -r ' :2or?;
4"-
■J- -
»*-*a*«*^****-*,> *,#* a *»**
•* κι, »nMi
i(/
:
;
34 7.'.d
. 33 .3 ■'. '7 D.Cp :ϊon3utton Cptlon 1
■"36 ^•■ 3L;:;.a =* "Opt.or.i"
■ 37 II,:,- - 232
.33 LeΛ = 8320
.iidl2
'- ^ 1 ' r J r
- 6 7 Λ .,_ .7 3 v> , n n ; --■ ;cx 3 ~ 9 ΛI' J'JS" c - 2 'G-fl'sr
.,10 - .'arancj 0 'Εlzl
11 ^e^Coior IKΛCC ^ v.
12 ~2 rύit3v/ 3 'NOES
^s 13 of 204
£
.../ 7 ϊ.z;.. y
',2 r :C,.;: - 7HYC .. - ■
29 llsl + ϊ * 312
30 L;.1 = 35 3
33
- 1.
*■
/ "'--" *• -/
'"" 4 . - , - sec ...-• > ' These V_, ΪSCJLO be used */
, -> /' i xcug"-'-' "--' n, - / w-.e-s a 2 » .t color value is nesded. */
Hed, Green and Blue */
..! '/
27
77- 'IV- 1— Ps-i 7_3 of 20-1
3<ι
7"-' x***.ι**?»*ιtr*%*»tf»β * Λ* ««***/
11 I:- 3 '-otdlo..'--
12 <;fe;
1.U-!3<
,,*rad3.3-
3'
1J " ιι )"Λ2:t7D, ,ι'
13 "cctofj... '
15 εhjc "kfo.h"
23 -» r70 TidBarΛl V
3D \Yfni ϋ:n':Q OtOCCOO
31 Yjf.,133c-a.:l OxElCCD /,92 :3L -(5„3~Y3>3) NONVGAM0X430CJ6
OX3CO+IOCFFSΞT OjύdS+IOCFF E. 0χ3 a+IOCFFSE.
"];
7
•l!c l
«*%).
pωMώtV ι∑.t ;pcs. int Pix Λ luJi, t PαH..g_.n,
5 :c
J
>
/
>
"* 9
* 10
,- i 1
17
15
!3 h ■•^2
- 51 n
) 1
- . -;
,) 1
32 3
:\ 3
)ttκ
< «, 4 ;»a
I. , ». <ιl 'l)I >tt
l«lal«
♦»**>*S»» »»«»>»*J*1ι»>»». »«*»«**♦ »*»*»«/ */
3) n* r .. . Lι..-.'.„t :'% t ', ι-t ax) 1 tr :\ '• : r- l = v '; :;!,.!> i.3X); ".( ι<r.ι)r
KJ
*β
..3: ,:cpu.< ^ **..,,-> .,)i»IJl>>»«»*«/
15 /' ■ ' > ^ : ''-I'"* ° *-'e bcrizonal scan lias in question */
15 : "7 '.= ?,LV./_C?_=(~:'si-ned lon?)y 1 * 120+BsrΛ ;
17 e'-3 :v:A7V_" , j ,ιus';π3J!crg) l,192(3+Bankl;
23 iLwri'irJ]--,
21 ?IA"/_-[pJ-l]— .
22 " ( : <,!- \
23 ;
11 , ,/) '■>>■ .» liιϊ»*»»»>*.»1ι II»)»,»<l>t >.»**).»«»*»«»»»'»/
- ' ' '• ♦/
23 /»C 1I L".J1 ton M.:.t5 bank '
27 ii,. n! it C vt_?ixi'(,.-.t xl, ini y I , int clr, int bai )
23 {
23 7tA.r-)X;;
30 / > ^:t 'o t>s aι"Jr;;s of the horizontal scan I'r.s IT question */
31 W-^ '-^ ΛL^_E?_0 ra3:gπe loπ3)yl:'12[H-B!-n 0;3be
32 ΛLV.V_B?_C=(ιιnsi3nκl iongfrl* I920+3ankl;
33 I
1" :ϊ :D t ; p siticn en the horizontal s an line V
-33 ^v:;c7.'o7-
25' c^.31 :n-=π (?. V,V_3pjay*Mdx+2]); breϊ' ;
37 κu32:κS:rrPLV;_crArr-yN x-H]);brcr ;
33 <r.32:r-tt:πCM.V7_C \mιyNa::,"0]);bre_ ;
'39- c; u:tr-3rrr.(0);
40 }
41 . }
3 " * v •'' 'i • r-'-,3,>- : .Yh7(: ,y,r.j,3,3V
33 '7;Yb<l)
35 7.'C-5^CL.:^ -p3s; / -(:r.:Xv y 3+r, io);yy-) 37 P tPπs(x,y ,r,3. ,0);
," * 1.. 7 i Ur.'t Pr-srϊ-.i— ?.-:,s_? cIYM
o
. LYΛ));
--2*. 71. - ":; '3t:!- ..i . i »;fc. <XΛ ,t p",C0;
2J , * '. ' .- j ιθ LI/J '.7o '
37 . \ .-.' 7CAL _3"< --rt . ). Y7 ;<v. .)
"i ! ) ■:r.ι doliv^O;
33
"* "-"<31 rv 3 "VY- a to captured */
YCAL _ε port _3Jree.w{voi J)
-.«» ,
•^ Ur.:t ?.-" ,.- JI>— pjςs 30 of 14
-■'19 Yπ .1, ' ".3.{i.-'ii.; .
:t.τ; :: r Λ !,7 Λ -;-
Y:-:Y..7r, YAW.. ,;7'i ;v : !';! ' (7: j_i) X l.j) J
W);
'34 -.25
; 35 , * !o;,i 3 *.ViΛ lews EM? file 'r.ϊa a sps lf d Window on ihe Insync 74 */
37 .- */
Y 33 - ;* 7...-i-!i: ;cτ.cs, ypos, PixWiJώ, Pixl 'sig t */
?;; ■ -■. « */
7 '40 ; * :-:t- 3S ;"-.d ypos is whers you want thj upper kit of ΛΛ EM? rslαtϊv: */
■A 41 *».o±i£ .-canoris;aO,α. ThsP.^VJdthcndPLxI- ir tsrs'.e'.vici^ */
'* 42 : : ;*.■_•■. l':.i*;;:ιt of thsSMP Itself. */
■-.43 Y */
31 /> L.u.tto valid rass- V if(- > 50)l3 »C 0;3,Λe1->c~2x;
33 i! ( < < 0C0) b =• C C X 31.3 < - sx,
o; /»lV7t to valid nnjs */
:;( v > ό-'.O) l'V - 640, -L i =■ '*;
■33 if(y<C00)l'V«*CCO;-L«l /- ;
3 -/•*'
10, .v.-;.. -r.twiYi,
•"!. i.
* J t,s.-3- % re vivib, bC/
11
■?} ) - r
- 4 1 ' 1 /
* 3 - ' / ' ' •
/ 1 " 3; 7- .I/----.
Λ 0 ' J- '•■ - .1 " - ' •-*
* j . ' ?. . - ',) :• .• --•: f +9*2:00,
!3~2 ! '• . ' » ) .:.t --i.*-- r u ':1- -
29 .an 3: (3 }
^33 ^^»« '.«» «a *..«»».» -»• **• ...-..*.....•.•*•♦••*•*••» .„♦*..*..**....»»»*/
34 '.o'd ?. v^PASCAL_.xportCbaiScrser(Iorg DinVS;!)
*- 33 ;
2" 33 \ c'7 "'τnl7. f,53,C':D,?5θ.0,950,0x00); 37
- ♦»>».*» **»**..». ♦«.*.*»«•♦•»«**..*»**^****»***»*»*-*» '•«»•*•*»* ****v
J > ' */ ;^ ;!S;SSK«..»«.«*.**'« ••/
- 41 -.o.JfAR PASCAL ϊvpcrtStrob oid)
,-a.
^, ;,->"-V: — ran — ?-< YbcfYV
', :z J'J / '
' >- 7c:3- '"
$ >- , f i.Λ •;. , '
Y
T8TZ/-.6SO/IDJ - Z68TZ/860ΛV
dw
\ /* "".o'.v rjvls spi'.clsriro - ..:ι .: "s ,-r'/
5 •..ι7:(P-3.":i' r.3ia&i..(} -=Y .
5 O'-.iti-:-;
7 ::(-;• ..>*C3CC00){
"...urnS -* '.V'. Ys7 - 'vet.
9. rsfcεa 17: tι-.>>
0 ' -
1- }
2
3 /•r.v':t-ot 3Ti:r.3i;C. t :oυrr |;' k-.'i !'J ixιt3jnsor */
4 . :cur.t-"»:;
5 . /•' vιit.':;r 5".vp.',c ε,i "3.'.ϋi-r iho '.'.'^.-f ' β .ι::o(?r∞?artSsS£θ'=""":>!,-« ^-c^e) {
.7 ;C- .ΪH-,
3
1
i.'Y rι.-.,.--.c£rιr.
':C' ;
11 -' rttura *. :r:ι v.-.;
' } . 7 • ■:: ,/ v.n-π/tY;:;- i .r to live
13 :<_.-.
■£ -
J i.
" 7-17u;( ,i;; / ste 11', •; id -o it
VΪ.-.I :-l sync
;.7.7CU'.(0,C~I;
29 / " r ;t'..n product captured status */
30 "ϊt rΛ-?ts •» ProtJuctlπnξ'iCaptun: J;
J,J j*t,t,iv.> ** »*.»♦■,»■»»*■*«,»«»*,*»****»*♦•*»*•*»** »***«*•«*******»** »■>•»»****» »»••**/ / * ™c turns £ ta is if in STANDBY mode or waits for package i f in RUN mode */ ( /*»**»*♦■«>«♦*»* *»*■»■*«>**,•»»♦»****»«*******•**-•*****»*»*«*******•*»»*»*****•*«•*/
37 void "A?- PAGCΛL _export lB_Capture(int PortVal)
33 [
33 :utxr;t;
'ID dolivcO; •'/ ?.:-(i3r.7u-is e grabber to live
41-. xret = r*7; .Cώ(0,l ;
42 Dchy(i;;
• 13 fKs .0" // stop I've video at next vertical sync
. ?:•:. -.Unit: --»:τ— P. ;.3? t .
• < ml:
-,Cr 7; ✓.' */ cYol' */ */
, • ,
• • .
• "T.: A
" I3t
1 »/ */
•. .. S VΛJ-.J 5 .13 ~ r.is. " ' I
_
" - ;i 3X7
*777 >;
<•) 13
' 14 : ;
^,7 :,.\ι ,:.t.
*rc i" .
■; 33
r, ,.
Λ*1 i ',<^
-1 tcp;
23 -.Sh.; 27 '.bctttir.;
- J7- ' 1' 3 toir.r.ti33lly ssϋϊct Graπuhrlry ba .4 cα 3oi x iβ V
"' J .•' ■tCr.i.1 = ;*dsfeuItio5'*/ !7(7_7t- ,o.7 2C0) xGπai-';
-*'-3r> i;;(r'-..t- .V,<1C3) xGran=G; 4) .:)<03"0) xGran=7; 7)<02i) .u3ran=l;
■ιS JO 73. .. -.. f 7.1y ssloct y Grac l-Yry b ϋ.d on aoi yύzs */
.Defl 4
3|
1 ! '■) 1 -
3 ; ■:.;
•') 77.
9 0
11 . /» ' ;► i ', :.'- j'. Y.'i-'j ctYv3 re ueued iY..'.'; '/
12 17 (" oi... '! ■.: --= 0) (?,3q-.:-33:;d:.-.:t = B '. O); - . .•cuestβ Bm '- = 3?.nkl);
/'jfsctsj.tuΛCl*/
;jrri-p;ι/ ""-;c': l''r'''' ■-yGrta) (
15- Crari) {
U ' '. '.."- !r-3.33(*:li3 hcrfcσnt-l sc .J ιu 7τ - :.-:oa •:'.;7":ιc 1 !o." )y '12 *-R3C':-.- i7; 17^
.i "i on . -• .- fiior... i
YΫ.Y;
■0' Y;l;:""-': Y'v..l ?'--'.
11 . ;' - •=: V .'; pH';
■>'"' '- 7: f Y7' Ypr-!'.
: .ι .he str -r r
31 vfr-:>.ci;
32 }
-^•I.-tΛ-r^-n-Pϊ- e-UcflCl
J . '
5
7
3 •
9
,
-fit - * . U ;.\VΛ
-13. , ! 73. 27^,1/-'
13 71 2. vΛ / - ',7
.,17 - 1,77V ,
•-n υ , ..
20 < •>
Λ 211 ,, s
13 r v -
23
36 _,„ \ ~: 27 \Λ*;
35 ,,.,„„*.,....»**»*>••—'»•• «..*♦♦»*.....•.*••»*»*♦♦«•*••*«**•*•/
35 ;* Vid-o- .-^S.tup-IrPJalizs Frame Grabber's iin3ςeparam3'.-rs ., . */,
33 \ oi 1 FAR PASCAL _e port VI ieoParamSetupO
39
,40 //Tnlt..r-Λ l.-.*j?,i bc-srd p=r -vis for 3πghtness,Contr3st etc
Ml t,et_vi 13_', .p"-t_scr_ιp{Achιn, Ybrt,ιδcont,3tsbaip)7.Sύt,ώh ϊ.};
•;-•"•— *J "t .V ■• -Ϊ— Piςe !2 (. f 201
! ϊ<<7);
: ,,r 13A 3 .; r . 1 t \ . --• r,-.oJ.\'CΛ 177 ..rr: 7, COI.CR31 '. I i%4S CzgaszLSA, 1970);
_*"v*e '11 c */
.13 ' D'.-Y'/L" YϋJarϊ--
14
•ijty; '13 '. Y ] .'A3. PASCAL _. - ' L 1 pl ij LS ABiΑ('ι. • 1 - "okSβ'i)
*'* . -1-3
**s ; '17 ;;(?:-.' : o)
13
-.-- •ID
" T . i.όΛ
! -
IV ' f",pm-?r;e 14 -i
^>
3 c
"'
IJ )
* 1
1
. ( I r .'".
. i
3 '
( r
23 V w ro - >) {
3! • ' 1 ,), / rfa.t Icr : t .. : 1 "
32 7,1 -0, // cazniraj uns i tit 3 i.'
33 7 c 'C. // firs strobe ϋTht
3
l ,/ su live v 1-3 t
r.
' c 1 jnc
3 ■iiii^ Captt-vJ;
_<0
33 Y 3 c- . p- c i > l37-.l ch. V) _rτι C01C102 ci/J V
39 * -777 C)-=1){
-*^ *'!/-Cr ci-nsr fr-L.ts yaccr o 1..3
4\ > a*>2~ *' *Cu\0,l);
43
"3 ._-Λ, //stop live .J0 -"->t verticals) ic
r ' : -3 L* l.t roή.--->— r :* u of :oι
.) I 1
> 1 l .. ϊ ,Λ*r*-*n*μytf
* * * -
10 t 'Λ?7 - \L t D 7' --'. i : r 11
« 32 / ' '• .r ' ϋ : 07F .: :'/
r outputs
«>>*.*,,**.,,
****.**>*♦**********
•*
»■**'""*
t ,0 _ »_Pc.;S S3 of 204
-
I' llsM . :: Lm: * > Kill ϊ*«<<»» , I..*..*************** '/
4 /)l)«<»>>!»l»>t»liJ>J 'i .- *1 ' »
IKJtl X • !»*»*»*»**»**********/
■ O :J
-rY3ϊ ,9ofYY
23 italic ■= 0 'Fib;
30 .-ril«'7ι.-3" ;'ι = 0 77
31 lYYrc. :..
32 ? 3r C'ι,>Y = ΛF.OCFFF.
s
J- , -- * 74.3
2 Λ 1 ,tr. , - • 7 '
3 .. rojx . ;
4 ,-...2.1.7
5 i-by.t •= '41
8 Tattln. :x - 0
9 Text = "IMAGETST.f[ ""030A
10 Tcp = 72
13 - 7r.Yι * 9156
12 Ξ„d
V *! .
23 ir.tlsrllra •= 0 'Falsj
30 it.il! ; =■ 3 7rL.
31 sr lice:' .rαr ,ι ■= 3 'FΛ'-C
32 HnilPrcp :rty
33 ro.-3CoJ;r •* i OCOOrFOCΛ
31 llc-yt => 132
33 et =» 63
35 TaLb .ι = 3
37 Top => 5C1
33 7,117 =• 3035
33 Hr
40 DJ IΠ 7B.£h ps S apej
41 BackColcr -= ciHOOCCCCCOΛ
42 πcr srCc'-r = ώHCCC OCCJ: 3 Il r iVId li = 5
44 Hci:' t - 972
45 Let =• 35
45 Tcp = 43
47 7'd li = 12223
43 Sad
43 £.;
')YI3.L b; :1 LabϊlJ
34 Λi:ril-v.:3 ' _: ,' ;u-ne = "MainForra"
35 Λttr irs V3_Critιf- JIJ = False 3 β Λt-rilru:? YTYΞrpo: :d = Falsi 37 Option ώcp'.Ϋlt
33 Dsit.tΛ-2
= "Ss!3ct First Packa?s = Tr3 = Fa o = "Lciπi" = Tzlzi - "Detect"
- x" ? To ΛOIΛmySizs
-3' 'j Unit Program — ?c"_ϊ 52 of 204
0,480)
As fc;3 r)
23 7; '73: 7; "3 Option I ClickQ
2.3 7:177)
30 ΪTiva'.a 3'; ;l3 Cp7;o 3_Clic ()
31 7.17>:b
37 IfP.-Λr.Mids'.-a ljiϊT en .3 Iπι:-; taf33 = GrabOnSϊnscrP.ur.Mode.Ei blsd)
39
40 -Staus = G:"3bOrιScr.rϋr( ε3r:ιModeEnεblcd)
_■.-:•. rrcsr -Pass 53 of 204
-••r
■^Captured Thϊn
"73 :• .
-4 . 7.t*
:
-31 End 1/
■32 73 Select
-33 'one pr-ss
to complets
31 . 333 ~'.Hϊ!iest = Msssaςeld'β
Y :.lof2Cl
2 . ' .' ' , !.; '
3 ...10777" .• 7 )
4 .'.-.77::.. / I
5
5 :'.i', * J J> r; • .. ■j v.. .:;.. )
/ 1 ..1.3..'...!,.:. Λ.3 Lev
3 ' 't'surϊ-.!ϊπc'-j is displayed
9 77' y.
i '..n 3 leαuSekct.SLυ
10
'C3.-j'.:!i7:rt
'.3r.3 COMMAND processor
13 '::::..r.:i-7 .-,.-)
1 !• c:-ι;:..ιl- 0
1
13 . r : ! • M .) *'
17 ;,7t(7 ••, .1 v7ι7C;)7;..".ι
13 M; c( f < .1....rriil-Y")
23
21 i ;, , --• • r?)V- .i
22
23 Z :!.3t C is ; o, imand
1 ' 7' t , 1
• .
*)H'- •t ;:;
•»..
) r> 3G *ι:-.ι_ . * Y
>
I YiC;7 ;
- 2. lf
; 3 ....
10 .12
•3.-d ' :56of:
'^Y7* ■ •.:.*. h
7 :v: o ,?-:.- ? Ur.it rrogm.-n—P3557 of::-;
, I * *.l* $&*yHM**m*V #**+4*ϊ«#ϊ**ϊ / 7
, 1 ϊ i )<)»■.- » )
■finj L'li.: T. ;ΓJΠI JΪ 53 of 204
7c' . 3
7α -- [Ml 77 " J.
7? - i57
0 ,77.1' = S7 2
11 'Ijijit = 3772 12 L.i - 0 13 7,3 - 0 14
*Vidi - 7692 15 :-d 16 -7 v .3.-.
• Ϊ ?. ™2
:-17 IIJΪΠ!:. = 252 13 Lsft - 3350 19 7l133 = 3 'Circle 20 f3? - 5 40
'•T21 '.Vi.lJi - 312 2', 23 ;.n\ ' • d'lipel 2 7 μ;'<7o - iiiccccoco 25 7r7... > -' = 0 T.-3.r.3-.-.'ιi ,' '7i 7 -> 2J2
..3 ' - 70
."!;. 3 * 3 'Cir. •
,'n V7 .1. ' . ,:i-!-i> iisnr-i lit = 2 'Center l\ .VjtθSi33 -1 True
TJaekS b = 0 Traαrprjiat
J > Ciptici "Version 1.0"
37 3sgin?ror3iiyFont
33 name — "Arial Naπc-.v"
42 underll" i = 0 'Fake 7;
43 ιcp -= 4140
) : i
C" '.7:ι - " - '
J C ϊ-ι cr;t y »■ (.. '
) Λ..E 3 ..!. '
.il 1".: = 77
'.Liis - 0 7a.. i
I jtrlk.r.irou 7 =» ύ T
1 E.;cl?:or ;.:/ l / ;:77-.t s •17
1 J L:λ — : 1. J
.7 ι 7ι7C..:.•
1 )7. ; ..• = ") Tr",
')'- (" - j ,ι . "' ** 3
7.
! <
3) ftisas '" v77"
33 c ars-: ^= 1
34 italic 0 'F.ι!∑3 7e '0'04C.t
Fic irs = *TNlT.:,x":0011 43 Grc:: = -1 Tr~z
lr[
J I
-3 ' 13 b
eel of .
7
9 lcgir.Trc.-: :rty Font 0 rl33B'3 = "MS Sans Serif 1 chars ;'. = 1 2
■weight = 700 3 see = 12
44' undcrlY.J = 0 'Fake
45 it?.lic = 0 'Fake
46 strϋ:c733 'V_,!ι = 0 'Fake
47 Ξ;ιd?.- p.ϋ •y
43 For3C:7r = &H0 FFFFFF7c
49 HsiYt = 420
, Unit Pro^π?-.-^ •...2 of 2;
(3 • . 77
7 t ,
• ι7.3. . f 3 <• 5 n i Z If" '
10 '* "'.Co' .HvOCGC -
11 '- .''iij' "SadCou "
12 '* .iϋou J - ' D..fιi*
13 , ,- "<\ t
14 . .'β - ' 132ans Serif*
15 ■ an- - I
IS Λ'3* ,-. - 700
20 ..7. C3. ' . - J 'Filri
21 7 i 7-rc;
22 . : .Co' 77 ~F7F ."-'?.'..
23 . ' t 1
24 1 .
25 , ,
25 r. : ' V Csi..1"
27 i .70
23 ' ' 1 lili
29 . 1
.30 < iC\t5
31 .7"->r. •-. - 0 'FLt
32 " 7.77.- = ,-CIJCLCO: CC .
33 L 7777 - "Good Cour.t"
34 D .taΞcv "DaS-l"
40 '".37..Y3 = 0 'False
41 italic - 0 'False
42 stri ed cj = 0 'False
-= TϊHCOFFFFFFΛ
= 3
43 = "CcoJ Count"
49 r. J
1 Ϊ J 'flat
. CV-r = dlKOCCODs*? 1 r.:ι = ,Pa. :ι<_s>'sκa£"
-- "Dalai '
7. ι?..p- "v rent -j 7.!5 Sans Sari"
14 italic = 0
*FaL>. .15 .
•tl'til rou 3h = 0 'False 16
" ;.?roperry 17 7.r.Coii.r &H0OFFFFFF&
■7; l.t = 300
19 74 <=» 730 20 T L7d t = 3 21 ..' ^: = "Packase N'a;^" T> 41-U
'7 .1 =
» 3732 ;
2/ . 7.CυLr - ΪKC CCCOCC
*:
"i: fiώlJ = Tιc a Ir.s -i Fi!.
." ' Yoi.r. i "Da-al"
J 3 77 ?r ? r / ■" 7 it
3'ι Λ_r.3 = "MS Sai.3 Sen:"
e e alse FFFFF&
43- r
- '. Y*J.Ό Imsiag Unit Picz∞Λ- ζs 6* of 2C4
= 0 'False c:yF^Λ
= "MS Sans Serf:
)
'EV,*.. '4
77-
- i
1
11 .17 :•.. 372
12 71 177
'
39 2ackSt :i = 0 Transparent
40 Captici T ss File Nam
41 De iiVc^ :rry Font
42 - ιιarπ3 = "MS Sans Serif
43 chair ct = 1
4d weig t 7C-3
43 hS 13.3
46 - πd.Yl. ; ~ 0 TΪ.S1
47. itaϋδ 0 "Fibs
43 stri ; Y-avYi = 0 Tabs
3S
= 372
J i , 122
"- " 1. „ λ r -> 30C.<
3732
* 23> iiicccxocrc.
ID" S T
* "
>35 ws'3-t 700
3) size - 13.3
0 Talss cn = 0 'Fa s = &H0OCCC0CC&
312
7S0
6
1440
43 Λttrl iitJ Y3_iN
Ta:r.3 =
- f L"s.t rr05re.11— ? 63 c 20
: 3 t. Y n 2:, " 7
7 j. --'7<1 ClitΛUrateϊ As Integer)
; Unit Pregism— P2ge 69 of 2C t
5 '7a -. ', ;
7 " bl*C C.1 £ 3Ϊ'3T'3= " .Λ.'TtZ'ι'
3 Ya
'c Cc .t .aT ϋijJI ir = "f.',pτθJ,r,ι~i 3πicros~2
9
Λ'10 ' CV.iiϊ.nunics.tiuω Constants
411 • ~=«-«— -—-— —
12 J C Cr -t I lO? Λs 7te-s = 0
23 •• li "c :.. „t iT G Λs Ineger = SO
- 23 7777 c C--r.3t G77EE _L1GHT As Integer = 900
- 27 b:7Cc3JtRED_LIGI]TΛs latter =901
- 23 7ι blic Co. ;t YELLO'.VJL IGHT te Integer = 72
23 Pι. l*c Const EI IORI Λs Lnteger = 1000
■ 30 Λ bile Ccr.st EPIOR2 Λs Intessr =1010
32 P.blis Cz-zzi MAIN_PAGE As Integer = 0
33 Public Cc.-.st LΞ.\77l_PAGE Λs Lotε-:r = 1 31 Public CV,Γ.J: STΛT3_PΛGΞ Λs lutes :r = 2 33 Public Ccust DIΛG_PΛG3 Λs Integer = 3 35 Tub1.*. Const ΛOI_PAGΞ Λs Integer - 4
' 37 Public C3.-.:t PΛCKAGΞ_PAGΞ Λs 7tcSer = 5
33 ZVΛZ C "!is: INFO PA GE As Inti r = 6
' ' 5.rπ>?gi™ Unit Pror-yn— Pϊgc 70 of 20-S
» Sf i
^
3 " ••:'> •' ■-• 7'C7;XV. '.'is-Yl 'SL ..1 Pcb.'c C . : 7o7NY' -Λ.'.'.je = 0
17b. lo Coc:.t 7.tPic .i?* = 1
'.17 C'7-.l curri d Λs 77"3T
13 713b1,! ,v.*c.!cFl.ιs": 33'J Λs3o:-!saι prc«ssir>»
- 1
■> 2
77". -.17.37S'.3:3.-'s£oole n Zk d YoISits As I olean
,723 C7cb.il CπiStatc Λs Boolean 777 C!cb_U7bii3 A3 Boolean
■-■> OicYiJ w jrtsπύlia y Λs Boolean
• 31 Cl'7:.l Tc;tCc ?.t As Integer = 0 = 1 - 2 = 3 I
<8
7' 7ιl2:. ":,C.tιctΞr. bl 17 . C'.oilC.'. :or:Coant.'37.7-/3: C b.-JIT-Y 7 IsEnώ'cJΛj 3o7." 7777 Lo. ...Mo.!oE;ώ!: \;7:
'
C'.LV.lFill o' .tΛs cn" C!c 3l7ι-,Co.i.. ΛsLor-,
i 7YIL7' .C .-tΛsLc- Υ.7J ID.- ..7. -J ΛJ 7 I
. '7':Cc. :7',c< r.C
":v 17..
"
cctiYiandπw.t-.. :
needed") -n.ir.w pe fnct.. I of this AOI
ACI
9
$ ^_>
■ :ne smear aad uπα-a n ^or^-a ϊo ypecny e e>.t. it
VrrsyTi;:
> *• v ; . i..v.. a Inx-sDll'.Yr _Λ "cΛulls'image.dπ" () Λs Ictv v / J c i. j rYi-.rion *3_Versio'i L.b "cΛdlls'-image.dir f Λs Doub.7
37 ■• (*Tiy Val st 1 ; 7 int.-ger) As Inter .r
23 7.ς
() As Iπ.tger ύ ./ 7 c'lteCus a Caoture Lib
(ByVal PortValΛs Int g:r;
27 ; <.
Mi Tub Delay L?o
(By Val cluratio.iΛs Intej.-r)
35 C a' r 3 Cub Strobe Lib "c:\dlls\image.dll" 0
3 C3C" 3T3 Sub StrobeCmb Lib "cΛdllsferge.dir 0
37 2 e:73 Function L-nagePcckrge Lib "c dlls'amage.cir 0 As Integer
-3 ) "7 -c* e rimc'acn Dlgiiallnit Lib
33 r e:lr
3."incticn DigitalOut Lib
Λs Integer, ByVal state As Integer) As Integer
- " r t rrcgnm— Page 73 of 204
δ«t
ι u ii .a .ύ 7:\d' •> r.ΛϊL ;.Sύ" (ByVal CI... r... ΛS l...e ,..
- ' . ","> ' ; *3..'F'7:_iT':AsStr' -lAsBcolem .1.7 , ,7o 2 luad 1 7177 «.ϊ ="-.:
3 λιair.7 •..τ.Durr.-;} '.s'. a = LoadPicmre(Filenaιr,i)
10 .'Jab D' ".-,l_l.i":0
11 TJL cc.i o laitijSis die CIODI024 Digital card
12 DI3itclIr.it
13
14 "De.ault DI jltal OuSsci ftart Value
15 Di';C.?7ortVal = 0
13 "cndJ-.b
7ι3 ϊnte^ar)
e DLL Version -> " &. !B_VersionO)
F anciϊcπ grcbQ
39 • grab = IB_gra'irameO
40 . E nd function
41 F- laicllon Imrgsϊ Is tPaclc-g O
4.2
43 n F..r.ction
7aπ : ! V: ;o LTC ;irg Unit Prosraπi— Page 7 " of IV,
b! _-npτ.,'" '/7'ljnanιe.'i3i*iag) -s.leC - i }_L<-7.7 IPl-ctVlo.0.1-337'', 0. , 640, 480) 'I :* ( . c o 0) 1.. a visgBox "LrroiBMP ERROR -> " & \R .t
1 ' i - _ J C .
7ιbr: '«0
* VI CT. ::»"U.tAsLor>3
13 L 33 y As Integer i '
13 'Li.7 ly ώe -Hyι-r n Logo and InSsmation 17. 13 LaaJIriiinlire ")
i 3 ~ ite πte . Ic '. in an a roc-sjig .or p o act sensor is o.
23 " Ce*ϊ ,3. ■ 1 = F lse .-.-2c;.. t-
% ' '.„ ' - ,
i cDisrb
1'!
„• ς.M 3-=.7 e
'7 30 iT'. ort = Fz e
BJVersionQ) frame buffers
' - -
■j 'nitPr -Pace 75 of 2
fl
„
3 ': 7 \ i./- i '. .:c.-.;cr system
9 Call ir.viic ιt.-;(reϋ, Li ^.tCn, True. Ji
10 Ca"l 777- .t'.'r(yr-l, LightOn. True, i)
11 Call „'...' : . r( grπ, LightOn, True. 1) 12 ("System Ready")
("c:\lcso.bmp") Foπna, Please Waif )
v"Lc- 7.:g .'.C I Database, Please '.Vai;")
30 "ιi.7 .be 3 .: ■Ihe form
. Tϊ" - i- „., • .'.,* ci.n...
37 'inclicr.ta syctεm is waiting fcr the other system
33 7!ainFci3n.op_nιo e.C3ptioa = " STANDBY "
39 Statistlcs.cpjnode.Caption = " STANDBY "
40 RimMcaeEnTbbd = Fake
41 LcnrnMo cEnab'sd = Falsa
42 iller = 13
43 Statistics.Textl (x - l).Text = "•*
47 Ctnt:stics.T3xt2(x - l).Text = ""
43 nta i3ti33.Text3(x - l).Text = ""
-aς.!- j 'r.it Pro;raι — P g3 7δ of 20-t
'+
a 3 7 7 l...3 33 ;! "" i 3 17 3
P. 7vl "3 !llcccc?c.ll p.. • . J to 7 '. n 13 λOICYiεtarj s F"l;e, C) FaLe, υ) Fa7e,υ)
->
7 s^
f-'
' • -- .-
'- r - ' -
J-
'
23 '.:.-> -- - i MI. i
23 -,"1
23 ,"7.Σao
, 33 1t *2Ict(S s-3F?.eaJ>)Th3nEt.tSub
, J T
33 *5<^ t s daa se fcr access, ig
3υ ΛCIJC3.D tιl..7..coπ7.'77v3La.t
-37. . WX = AOI_E7.Dafal .Recercet ^.eco..Oca -t 33 ΛC1J77.O. tal.7.cc.33t7.ϊo-ι eF st
/3.T* rit-J ; 40 κ, 1'" *- -c c-5 lot" 7a nt.l s
?a.n ' Do
*> " 1 77 ACT ret* vo
-3'- 7*7.Ci :J '.. S i
85
75 If
'. "
1 ΛOI{ndx).too =» Val( AOI J5B.AOITop.TexO
15 ΛC!(ndx).kft = Val(AOI_DBΛOILeitText) .A lo A0I(ndx)jight«»Val(AOI_DB.AOIRightText) : 17 Λ01(ndx).bottom = Val(AOI_D3.AOI3ottom.Tex)
,.- -7 ι ->
Z" \0 IfA01_D3.?ctiveTnen
ΛWjf j2 laY ug.Prmt " b.l.r = n & AOI(nix).top; ΛOI(nαx).'of - ir. AO*(cdx).left; AOI(ndr.).right '21 Cr. if
■;, - 23 *ΛO\'." Jx).throshύld = Va*(AOI JDB.threslioI I)
2} 'AO:'n -{).courit=Va*(AOI_D3.count)
•^ 23 'ΛO!(r.vir)..77r_v-ι7e = Yrd(AOI_DB.fi!ier_va.' e »
■ 27 71 '
(" AD! Record " ώ ndx 7: '
*.. -hi ")
23
30 ΛC !_C3.Dαta!.?.ϊcorcs3t.Mov .-Me ,t 31
34 S-abAOIDataStoreO
33 Dim r.it, last Λs Integer
36 If :ict (SystemRe dy) Then Exit Sub 37 'setup the database for accessing
33 ACI_rj3.Datal.RecordsetMoveLart
39 last - Λ0I_D3.D?.tal .Recordrstr.ecor-aCcunt
40 ΛCIJI3.D3tal.: cc rdsεt.JvioveFir3t = 1 ec;-, all of tl. e entries
43 ΛCI_r7.r; i val.Tcxt = ΛCI(nd0.red_vl
4 ΛCI_E3 rn_val.Text = AOI(n ).sm_val 47 ΛC i_D3.bJu_val.Text = A0I(2ιi<).bla_val
<1Y77- >;-.-^ Ui't Pro gran— Pc^e 73 cf 204
^°)
Y " Stored ")
* . cj_.:
>7.Ca 7π- * ?7ΪJ "
"$" '• "..γ_nϊ .eΛrstcbr *-/bGrt3.i
7 i -7.3 cp_moΛe.C;,> lcn- * RUN "
-a-. ■". : 3elt(3).G'p'7n = " Different-.-! ' LGB Values ' ^." i.Tlπier '.te.'al »
. ,-7 c :;STC?_:.!CΠE
. ] "' ΩModjΞna Ivj-i = False
-'23 7. JΛ>
-7"c S ) of:
t .. Yi:3.'7;.3c!ό.V3"<ae = 1
33 £ia&a':3.Cc.eck7.VaIuβ = 1
34 ΛOI(x)ared_val= 123
33 ΛOI(x).gm val = 0
33 ΛOI(x).b2".ι_val = 0
. 37 Csse 3
,33 Staiistscs.Check3.Va3_.e - 1
-Pa.ee 31 of 21
Q
Hf* i l
^■agU:-::: : S2 of:
c .3
)
3 If T3.'3lDcita3 -a V.J(7tatisπca..."■ Text) T'.ia
7 .Veπ&Ss*ec_Text2.ForeColcr = vbWhi:;
3 M;auS2-«LText2.3aclCo!or = vbB!"ae
9 7 :∞SeIectText2.Text = "PASSED*
10 PasεConnt = ?as-Count -1- 1
1 M:nuSeiecLText3(0).Tcxt = d(τ(Pa≤sCou:ιt)
12 El: 3
13 • Menu3e!eεtText2.7orcCo!or=vbWh::3
14 " Meim3elccTcxt2.3ac Co lor - vbKed i 5 MemtSelectText l.Text = "FAILED"
15 FailCoπnt = FailCcunt + 1
17- iIor.αSβlβctTcxC(l).Text = Str(FεiiCo ;.t
"13 ∑TvlIf " 7.7 If
23 aadalu 3 H-'Y'r)
3'.--c7a)T-". i.Yit .7?
.
'y be ΛOI'aberr.s roe ..J
23 77:-2o." (" Processing ΛOI " & AOl id.:) 29
30 '3. t "ic f.Itarva'us for the averaginj
31 l':*:.τ-25
D!
33 'sbowl s scrst3ru3 with the button captions
3 i 'Cap:ar:.Coαπιaadl3.Caption = "Sample P.-.clα-e i " & MaxtΛOI
35 'Captos.Coninand 12.Enabled » Tru
33 'C2ptoe.C0na.and 13-Enabled = True
37 'CapfΛtre.Co∑nnaandl 1 -Encbl :d = Tree
33 'ϊ?tnco7erimnse
33 ImrjtPac age 40
41 'Sat the ΫG3 color of the AOI box
* 42 AOI(ΛC I_r7x) je;d_γal = 255
43 ΛOI(ΛCI_πdx).?3iJ. al *= 255
44 ΛOI(ΛC I_r.dx). lu_vιl = 255 45
? 43 C 7.1 .CI ?.C12(AOI(ΛOI_πdx))
1 ',-- -'rj U it i'rou.-un— T?.ζ: S3 of ;ι 1
AOI(AOI_πdx) ref_red)) / (Filter + 14) ΛOI(Λθi_ndx)jref gm))/ (Filler + ltf) Λ01(Λ01_ndx).ref_b!u)) / (Filter + 1 #)
StrS(AOI(Λ01jιdx)jed_val) StrS(A0I(AOl_ndx).gπι_val) Str>;(AOI(AOI_ndx).blu_val)
eac, tune Λs Single)
. ;.tCι'.jllyϊt
Chare
23 ■* lainFoπn-T ~.e.-3 Infrvrl -. arat n 7allDYta:Cut(l,0)
T-aey.l
32 ainForπj.T:naer4.In!3rval = duration 33 Call D'sitalC -3^2,0)
31- Case grn 7':ύrιForra.T3T,er5.Interval ~ citraiion Call D;gitalCi3t(3, 0) 7nd Select
-lie
33 'nca,bn3dεver t 40 GtlactCaaeliglt
If sf tϊThrn Call D;s'!70u:(l, C) 7iS3 Call Di_italCut(l, 1)
* t If st-tϊ Then C ill D*s'_ *Out(2, 0) ΞLe Call Digιta'CY2, 1) Catssa
I •*7y-
L Unit P osranv- Paae 34 of 204
Λ
1 : , I J .I1.7 - 2, > .e C-ii D.gιtal0ut(3, 1)
1 II:'
1. 3
5 . 1*3. "..'_..1 lΛτsxtr(ByVal CommandVal As Integer) As Boolean
3 I ' ι db As DaM aae
7 7 i T3 As Λeceπlsai
-"13 7 - 7\.-nn-.a.nd" '14
13 CnZrrtrGoToEr i + DBName, False, False) dbSeeChanges + dbConsisteni)
27
23 23 : .CI ".
. 30 o.Clo.e A3 'Ir n3.τ t ^* J 73 "'32 Ht'tFuncti: n
M . -Ktirn
'■* 7fc>
")
"3tϊ f ι
Λ ,2.7 ■ 1 <L«'CS υ - ώ lCCOOOOC *c 7 - _ i = 0 "More
7 . 3 - "Sta.&.ϊ--."
•*' 9 '"] ..1 ,' ■= 02
;ιo ~ -3 ill '* .fCJ - 1415
,,τ' Tz.Λ = nSTATISTI.nrx":C:00 *>^ T a = 4140 . "-4'5 -= 1692
7.J
>; 3 2a7 ι77.773rolL3arVScroill
17' 7 = 912
l\ o . - i 3 Ur.ιt Pro ;r?an— Pa?e _S of 204
3 V
^
- 7, )
= 5
' = 50
; !. <'
Tcp = 511>)
7 V"7'_- = 500
->
> 7 '.a - 252
,- ^
Z J
10 7 7 i V37..» 'o TcctS
. '33 italic => 0 "False
* 33 strfket rctic = 0 'False
' 43 Hn l rcparry
.41 7oreColcr •= &HCCFFFFFF&
•r- 42 Heijr.t = 463
-,Y 43 Indrc = 0
7-~ 44 .Le.t = 9660
•»'-!' 43 77L7i - -1 Tae
« 45 Ta Ijde = 30
• - 47 Tsxl = "STΛTIS'π.f t":C0CF
43 Tr? = 3300
43 7*7 li = 1652
.
-; 7v
y O ?
7
.-
33 TabLY .. = 73
'-.-39 Top = 1200
-1' 40 "WWϋi = 1692
, V" and
' . *42 2ec'nV3.T. .<t2ox Te.-<:5
..-43 Aligrcr.c.t = 2 "Center
.<■; j Bac Col3r = AHODCCCCCOA
- 3 Ω:;lr7rc;- . Font
' 1"43 na-.r.cs =■ "MS 7a.s srif"
47 0*1333 Λ = 1
.γi: wol-".t = 7C0
' 4 size = 12
"-jU-.itPia∑r 38 of 2C4
;-. Λ.tlir '- n » 3 'I- :
Ena r. eπv
F r.Colar - ϊ zx :ι 423
\VΛΛ' 9
Λ
':
0
:- • u -:t : .-c -r -a— ?2Se '9 of 0 :
l« ^Λ oo
* I "7 '' -• 7
"2 -.'•: - 7
3 L.Λ 7Λ7
C025
-a2'> illLl i - -I Tπ
"-27 777 c - 07
"23 Tax! = "STATIST*!..7.'*:C 072
*
>.
>;:>..") of 2C4
#:
^Λc
•> ""ΛTI * ... •"■a -
"MSώinsSt.. '
1.3J.U. - 0 "raise itaL; - 0 'Fa'ae
10 jjrrii ssύύ..:: . »» 00 ''FFaahhee
11 j 1
12 Far- ol:, ■* ckllOCFFFF
13 1777 - 420
14 Ir.jsx - 1
15 L.-il = 7όS0
15- MultiL a =» -1 Trae
17 T T..llYYii..vv "m 5 555
13 ' T T..xxtt - - " "SSTTA.VTnISST7!I.nt
r.Ci
19r. T Tccpp - -• 2 25522))
20 -' ϊϊ//;;MMιι - - T D7.12
->•
: ι.ι \ ,ϊ. " .Tsvt Ό
•31 .'-1
*3 0 "Fabvi 32 strike.?-;: : "•' - 0 "False 33 En7Prcp:» rv 3- ra sC 7 ,r &K0CFFFFFF7C
^ 177 420
3f> Lid ax 1 37 Lslt 75S0 uitlLY a -1 True
2 Ta fcJ.v 64 004A
- 0 -Fidsa
- ) Til ϊ
J = 0 'Fa' i
- 7Yr - , i ...77'rr - 7 CEϊFFF. ? .
=
7V.CD50
33 T xi = "STATISTl.frx":Dθ30 rr?_ = 5400
*■- ; "Α'lύ't 972
.^_» Hid
39 *3.--*aYB.Ta ι3ox Text5
70 Λl!;--r.c..t = 2 'Center
-41 H-dCo'cr = &H00C0CCCCά e..7
-t >: Λ :
.-Λol
7:7a .. 7r'?-r. t
" • -■ YD
Λ '.1 , * 7
3 a.t -* ' " > r 0 .77 ILL . = -1 7"ι •
1 Ta'Y i-i - όl
731 Δ .7a VD.Ta. t2ox Texti
":35 AΪ' zzzΛ = 2 "Car.'.ar
-;33 ThckCoIcr =■ ΛHOOCOCCCO.t
:37. ras'iaiY-c .'.r/Fo t r.aιns = "MS 77;.. Saril"
' 33 cbars3t =• 1
40 wsi&.t =■ 700
41 SΪ∑S =■ 12
42 underline = 0 'Fa a
43 italic =■ 0 'False
-44 s*ri εi r:ιr" = 0 'Falas γ4 TacLYo- Vy
7<!ό. ForiCe = ώKOOFFFFFF.i
7,47 IlaiYt - 420
?'« Is-'a: = 5
L-.-t =» £'70
»-lV:.":a '-..-73 Unit ?rogra:n— P?:c9'of204
Λ S
7
r. i
'771 : , / _.
7
δa
39 strl ϊώro. , = 0 "FJ33 40 2.a7Fr p:ιty 41 ForϊColar = &HO0FF7FFF7
-•47 Tc:"t = "STΛT:3TI.-7rx":C074
T-i = 30.0
43 7/5 'j = 972
^{Oβ : 7>>
[
) )
π r J 7'.' a
^ ) 7aι
CC17
a
a
Λo£
' - t '.J
772
.T/l
- g U- . t FT- ---n— ?•< ι 3 of 2C J
6.3
79312 ;
.ΛΛ -
Λ*!-;v..a..i = 2 "Cr.'.r
7. nkCϋlar - .'illC C'-CCC .c
. iraat = :
'v.Tg t - 7)
71 Sl '3 = !"* 12 vir.Jirllr.i --. 0 'F.iba
■
.r no
• >,^ '.
23 7r..?i33.-ιty.'-' ont 30 ■.13.-3 = "M3 -a.sS..-i£"
FF.lt
.:ϊx":C0*:S
: Pro ZΛ— P. 3 ICO of 204
)
CCf,C.. J*7i llara 7c; if
■ ajnkrllr.s = 0 'False a* Italia = 0 "Fai.3
. 9 3tril:37ac;:.;α = 0 TaLa
7a: 10 H.i Prc . jπ :ι i FcraCcla - SSΪOOFFFFFF .'a
- r (■•■aj^t - 420
•771J 77x = 0
' 713. Lais = 5520
COBC
■'33 TώltYjx = 44
39 Text = "STΛTISTI.frx":00C2
: ■■ 40 To? =■ 5S£0 y741 *7ia7 = 972
;:- 42 FnJ
■;'■ ■ 43 3ϊ;in VT3.T ::;t3ox Text3
7744 Λiigπrsϊr.t = 2 "C.ntsr
7 - 45 Bac Colc-r = £K0C30G7 A
.; 3. 3 BegbPraaaity Font
0-47 nvzr.} = "MS Sans Sari i" ■,•■ 3 ■ c arc.t =■ 1
7 ^) w;*77 = 700
irs Ur.it IYCST"- - of 2C4
7Λ7
)
*t ) V
. j •• . ϊ . '.' -
; l".7'.t 12
:, ";
C.ι.i
31 Text "STΛTISTI.r*rx":0'. a
,3 Tcp 4920
33 "V:7'ι 972
. 37 7<3
Jasin V3.Ta-c3DX Tsxt3
"33 Λlisrar.sπt 2 'Center
40 33c Colar = (ϊHOOscαcsoi
"41 3;ginPi'c,"etι F Ollt
42 n ime = "MS Saas Serif1*
-.43 char.ϊt 1
:44 ■-vεi^.t 700
7" 43 size 12
* 4δ 'an arilr.o = 0 "Fal.3
-47 Italic 0 "Faiae
' JΛ3 itri :throc-j = 0 'Falaj ? En aVaperty
\"'V.- -I jUaltPia-rim— P'aa !r.2of: -
A
I : = 7 i
-- -I . ii i . .. --
7 τ.a - 77777. v
ύ
r C3C2 sSi.-'i"
Fά
Il'l o : ■ 7 x LYt Pre :ΓΏ-F- ; 133 oHO '
^A-A
' ' 3
- Λ = 77.. 7 .<'.-
YCO - 3! 0
-. *"**
3 JajtaF .'(."•;.• - i: '.-:t
' 10 1 V.13 — "MS-YasSarii"
14 Yarl*.; = o τ i
15 *' \ ' "» = 0 'Fai-2
16 rtr. .r:: l_1 = 0
"Fa
'ao
= 7HC3Γ
*"T 7
' 10 ;t_".t -120
V23 ' lvlcx = 3
-:2i ' lit = 3310
'■21 717 - '. Tr.: 23 - \T_- " 3
7.1 - "ST.YY.YL.It'"-
' 23 v. ) = I l
23 7 ' i -= 97'. 2/
■ 3 - "MS Saι.3 aerif -
37 Italia = 0 'Fake lsa FFFF7a
46 r.-t = "STΛTISTI.βx". ;-:LC
Vr ϊ Pre .T.— F "s C\ oflji
L
, , 1 'Cu
7 li ji . .
7" .. -7.-*■. .:n
..: 713 S3.π "v. ' 5 7 -- 1 ] , ;i : 71
•>
J 12
0 0 7,iL.i n i '.3 = 0 TalSvj n .,-ϋ:. .r v ι -= 0 'F ',.3 .
c-:0CF2
' ;•' : <- .'/.: *o-t
21 *, s 777 --: 7ι"
s_i »3ircy;,
'i = 0 'Fal.-s
3J T.r.dTfcpjry
35 "' ."Cclcr = &H 0F.7-I-ι--ώ 35 : ' x 420 37 lr.ZcΛ- 0 ft 3840
:Λ iltiL'iii = -1 Tl-33
-I ,' 7Iι.J-:x 35
41 Text "STATISTI.rrx":00F3 42 Tr-? 1550 .i± 972
:.-.d
:.ι;nV3.T3-<13oxText2
ΛllrrTioit 2 'Center
4/ 23cl. 3l r = &HC03C3080&
Sans SeriF'
-Pa^s ! εf 203
λλ £
. 1
•Vr.. 77!
7 J -: 12
37 n.':.1" i •= 0 "FilT
•tfils - 0 Ta j c-rltoTro'r
'l
YiΛop ;ty r.i.Cr!".- = άHeOF FF Fi
1 Co of 201
UΛ^
-'$7 , .. « ...
7 t : (. i i'7 '. :
77 "
J-3 Wii.h 972 J r 2nd
*3i?:α7r,.T.vt-oxTcχf2
Ali^mo .t = 2 'C≤ntsr
3av.kCoi.-r = ΛHCO: 0.0
3 ϊ 3
5ginPiC3 rry font
) r.arne ~ " SSri3S..:r
7 weight 7CO sizs
= 12
"3 mκlerli:-.i -= 0 'Falsvi italic 0 Tabs strlketLrci ,h = 0 'F:!;. OFFrFF -i
,Λλ
'...: - > £7 λ.'iltil. " 1 = -1 Y.- 1
■- T "77 . = 0 r t = YTΛ.77I
■ .-'tProg:- — "" ;-• '. "3 of 20".
'3 1. ,ι / Zvx: JotTsxβ
Λ<7 -'- •■' = 2 'C -tr
3 3.777. r = &H21i03031& ό 7: -Λ.-.3rty ont
7 - άEJ - "MSSansSeriF
14 FaJPropcrfy
13 FcsCa.' cr = &HOGFFFFFF&
0123
1
:012t
■ Unil Progr m — paae '.." > Df Z
)7
^F.c
1 Tc-: = *STATlSTI.frx'':0134
17 Ϊ7> = 2C0
13 1 = 972
.1.) 71
20 ::.;'..> \' .377: .UyxTextl
■21 .M'ZZZT.:. t =• 2 'Cπstsr
72 • - <.C '.. ,- -= v7:;c-oso;'i7jά i'i . "'.-.'.' Z' c' r.t
2\ r zr.i ' - ..SS..n3.*;.Y"
23 r_M .' - 1
25 :1 '.: - 7'7
30 3tiilc:: - . ,
'ι = 0 'Fal33
- Λir.OFFFFFr :
33 Us:;: C - 77)
34 In2ϊ = 0
33 elt = 1630
.- r Jl 17.77 ■ : •= -1 True
3/ 7-7."- .7: = 21 STI.fπt":013Λ
42 Z -gin V3.T-3x-.Box Textl
43 Λ.1:?3.TIΪT = 2 'Center
T r 2ac C3!sr = ΛKOO8C3>:30ά
3c^ Z?κς::y Font
-75 Azr.vi = "MS Sans Serif
47 chare. r = 1 we:-;!.: = 700
■. size = 12
: V"Yo .πr . ilft Unit Prosπii.t— Page 110 of 204
<Λ1λ
1 ■v dcπ = 0 'Fa&β
, - i ilic = 0 'False
«, ϊtr&ejircα ≠ = 0 Tsfeβ
•1 EndPrcpcriy
5 ForsColor — &H0»:Hr,rFF&
6 Height = 420
7 Index = 8
3 LeΛ 1630
9 ultiLks = -1 Tras
10 Tablnthx = 23
11 Text = *STAΗS5Xfrx":0140
' 12 To? = 5400
. 13 Width = 972
14 End
15 Begin VB.TextBax Text!
..15 Allsnmcnt = 2 'Cezstβ-
17 BackColor = &H002CS080&
13 BεejaPrcpsπ Font
.19 name = "MS Sans Serif"
20 chamϊt = 1
"-■ft ■21 " weiYi = 700
22 SiZO = 12
23 ucύcjliiii = 0 'False
1 • italic = 0 "False
■ = 0 "False
ΛHOOFFFFFFit
.i n ' rl.t = 423
23 index = 7
30 Left = 16S0
31 MultiLL. = -1 True
32 Tablr.d.-x = 22
33 Text = "STATISTI.fιx"":0146
34 Top = 4920
35 Wich = 972
*» r
J3 £;-.d
37 Elgin VB.TextEox Textl
Alignment = 2 'Center
39 BackColor = &HOOS0SO80&
40 BeginProperry Font
41 name = "MS Sans SeriF'
42 chnrsct = 1
43 -weight = 700
44 size = 12
45 underline = 0 'False
45 italic = 0 "False
47 striket r-tugh = 0 'Faise
43 EndProperty
49 ForeColor = &H00FFFFFF&
...ford Vivlco I.r.cY'ig Unit Program— Page 1 11 of204
T.? = ->-.«>
"". .: a = m
; 7:d
7) weiglit = 7C0 1/ sLs = 12 13 ...1,,-r , . = 0 'False 1 Italic - 0 "False 70 „tr.kc--lιrc.
« 0 'False ϊnd?rop.ι3
1"> FirϊCekr - 3H0CFFFFFF":
- !"0
7 .x - j
.7u\i:_i i = -1 Tr.e
T7 '7 . - 7
Γ-.I 'STArU'.r .ι7.)'->3
Γ - 3"≤ύ
\ 7. ii = 972
J i Λ 1
33 Je-cin VB.TCMBOX Textl 3J Aii ni.i3.it = 2 'Center
3 r Pac Color = άHOCSCSOSOώ
35 BegiaPrc erry Font
Jl name = "MS Sins Serif
37 ώarsvt = 1 33 weight = 700 33 size = 12 40 underline = 0 'False 41 italic 0 'False 42 stri othro 3h ■= 0 'Fake 43 EnάPrcperty 44 ForeColcr = &H00FFFFFF.S 4.5 Kslglit = 420 45 Index = 4 47 Left = 1630 43 Multiline = -1 True 49 Tεblcdsx = 19
7rfc.-d VΪJΪO I-ia ing Unit Progra — Pi-e 112 of 2C-
U'3>
- 'ST 7u3T ra":0" Y
1 i - 34.)
3 7. •:. = 972
\ 7 J
5 _ 3. l V3."7 :\t. ox Textl i Y ^πsce..: ■= 2 'Ceater
7 B3.kCol;r - &H0QU0SC3Oώ
1
1
1
1
1 EncPropert
" 17 ForeColcr = &KOOFFFFFFώ
13 Height = 420
13 Index = 3
20 Λ =■ 1680 -31 1 iultiLlr.3 = -1 Tπ:s
22 rs'-L-dax - 13
" 23 '.*-• J - "STATiSTΪ.:rx7!5E
2\ TCJ = oc:o
35 'V7Λ - 972
..3 r.r
27 7 ' i ' /*3.7.\L3o < Tt \: 1
2" \7p3ri.\ t = 2 'C.s er
33 JreicCol r - ώHC OCOieΛ
30 BegiriFrc perry Font
31 name = "MS Sins Serif
32 chεiscϊ = 1
33 weight = 700 31 sirs = 12
33 underline = 0 'False
Zό italic = 0 'Fabe
37 3tri eώrou = 0 'False
33 ΞπdPrope.-ty
39 FcrsColor = &HC0FFFFFF&
10 Height = 420
44 Ta lr7:x = 17
45 Text = "STΛTISTI.frx":0164
43 £ejj V3.Text£ox Te?.l
J VlYo Iπw'ing Urit FT03-..TI — Pars 113 of 204
1 Ali pπitrt = 2 'Center
3>κkCo!--r = £H00803080&
" <2 BegirPr'v. "irt cnt
1 n me = "MS Sans Serif
5 charset = 1
5 weight = 700
7 size = 12
"* underline = 0 "False
9 italic = 0 'False
13 stπkethrough = 0 'False
11 EndPropεrt
12 ForeColcr = &H00FFFFFF&
13 Height 420
14 Index ■» 1
15 Left 1630
15 MiiitiLine = -1 True
' 17 Tabln ex 16
13 Text "STATISTI. ftx":016A
19 Top 2040 20 Width 972
-' 21 End
22 3egin V'3.T3xt3ox Text6
23 Alignment 2 'Center
BackCclor = &H00CCC0O
23 BeginPr p.rty Font
25 naπiϊ = "MS Sar.s St-rif
23 weight 700
29 size 12
30 underline = 0 'False
31 italic = 0 'False
32 strikethroush = 0 'Fabe
EndPropert
3 !- ForeColor = &H00FFFFFF&
35 Heijht 420
35 Index = 0
37 Left 76S0
33 MultiLL-.e -J Tree
39 Tablnd.x 15
40 Text "STATlSTI7rx".0170
41 Top = 1560
42 Width 972
43 End
41 Begin YB.TextBox Text5
45 Alignmert = 2 'Center 5 Bac Colcr = &HOOC0CCCO&
47 BeginPrcpert Font
4 name = "MS Sans Serif
43 charset = 1
er 3.-d Vl o Imaging Ur.'t ?roς.-?j~ι — Page 11 ; :cι
1
7ό
17
-Ps=ell5of2C4
:'2 T
13 DejhVB.TiΛ :t3o Textl n Alignment = 2 'Cunt3r
15 Appearance = 0 'FLt 1"> Bac CoIcr - ώKCOFFCOCOΛ
TrΛIn ex = 0
Tcp = 4S0
Width = 9144
∑r.ύ
IkgiaVTJ.Te xtBo Tex:9
Alignment = 1 'Coπter
Appearanc; ; = 0 "Flat
BackColor = &HC0FFG00C&
BcginPropt ;rt Font
39 name = "Arial" charset = 1 weight 400
42 size = 13.3 underline : = 0 'False italic ; 0 'Falsβ
7'37 'Ά = 1
3 Tei.t = °STAT!ST!.5x":0182
4 Tcp - ω
2> "iVidtb = 9144
0 End
7 S:3!BV3.'3cd abeU
AIigcner.t = 2 'Center
0 Bas Co r = &HOOFFO0O0Λ
• 10 Caption = "Avera&s Deltas"
11 BegiaPrcpwtyfont
' Ϊ2 n∑∑ = "MS Sεr-s Serif"
'Ϊ3 charcet ■= 1
17. weight = 700
* ϊi SES =* 9.5
•-.1 ■underline =» 0 "False
■-17 Italic = 0 "False
713 stri eirca^ = 0 'False
719 H.idPrcpeny
JJsr2D FcrcCo'or = &H0CCCC0CCA
'" 1 Height = 252
- 'l Index = 3
23 Left = 9600 i Tr.lLιd:x = 36
25 Tcp = 3710 ' VvY.i - 1.7' 5
T ..* "'
23 2.- Vi3.L7.-!L bel2
23 Alisament = 2 'Center
30 BackColor = &H0CCOC0C07
31 C.αpt'cn = "Total Delta La-n
32 BeginPropertyFont name = "MS Sans Serii""
34 charset = I
35 weight = 700 size = 9.6
37 underline = 0 'False
33 italic = 0 'False
33 strikedirouώi = 0 'False
40 EndPropert
41 ForeCcIor = &H00FFFFFFJ:
42 Height = 372
•- 43 Left = 9840
4'r Tablndex = 83
45 Top = 5220
45 Wld'h = 1692
47 End
43 Ee3 V3.La el Label 1
49 Alignment = 2 'Center
Irrrrr- > U-it Pro r_~ι— f P.ιaeU3of2:
αW1
1 YiCicCc* r = &H0 FrCG30&
3 C μL i Total Deltas"
J i:.5iιιΛ , -r i C32
4 - name = liϊS SansSeriT
3 underline - 0 Take
9 italic = 0 Talse
10 0 'False
11 Er.dPropsrty
12 ForeColcr = &HO0C0C0CO&
13 Height 252
14 Index = 2
15 Left 9660
15 T bln ex = 81
• 17 Top = 3060
13 WidJi 1656
19 End
20 Begin V3.Lafc3l Labell
21 A!irnrr.c.ιt = 2 'Center
22 BackColsr = &HO0FFG000Λ
23 Cafica = "Reference RGB Value.'
24 Ueginrrajarty Font
25 name = "MS Sans Serir
lse C0C0&
33 Top 1080
39 Width 3636
40 End
41 Begin V3.Lab el Labell
42 Alignment = 2 'Center
43 BackCckr = &H0OFF0O0O&
4 \ Caption = "Realtime RGB Values"
45
4δ nr ne = "MS Sans Serir
47 char:.t = 1
43 eisr t = 700
43 size = 13.3
e~* VY.o 'me^'ng Unit Program — Page 119 of 2C 1
α^> o
Λύ - 0 fYi-3
„ - 0 Ta s
,n - 0 "Fa&e
:.. rrcperry
' Fc.-C.7or - ARG0C0CCCO&
177:,; - 372
1 !r.ι7: = 0
. Let = 1330
17 "■12 = 5160
13 γι = 1620
19 ' "2 = 6240 0 E:.d 1 7-7.177 lr.e L7:l 2 "" . ;.Co7r = WMiQZWΛ
Y ' - 1560 / / . - 0300 0 D'".3V3.L--belL2bel3 0 = 2 "Center 1 A,- -c.irance = 0 'Fiat βcc Color = .iHOOCCCOCOi 3 BurderStyie = 1 'Fixed Single 4 Caption = "OP MODE" 5 Enabled = 0 'False
Be jnTnpert Font 7 name = "Arial Rounded MT 3 charset = 1
1 underlir.3 = 0 'False 2 italic = 0 "False 3 striketlirough = 0 'False 4 EndProperty 5 ForsCclor = &HS0OO0O0S& 5 Heig t = 432 7 Left = 72 3 Tr.bL7.-x = 3 9 Top = 36
i V '.'.' I r. :n 3 Unit Pr jrs.n— page 120 of 204
A
v"ι .. = 29- '
End
J L I'Λ 22 iijre Shape5
1 BoπlerCo'.or = &HO0COCOC0&
* 5 Border .Vi th = 5 ό Height = 972
7 Left = 36
3 Top = 0
9 WK.h = 12180
10 End
' 11 Esga VB.Label Op_Mode
12 Alignment = 2 'Center
13 Appearance =» O "Flat
34 BackColor = άHOOSOOOOOj.
15 BeginProperty Font
16 name = "Ariar
'17 charset =» 1
13 weight = 700
19 size =» 18
20 underline = O 'False
.21 italic = 0 "False
22 strike->ro-t h = 0 'False
23 En Frc erty
2; For.Color = &H00C0FFO0.1*:
■ 25 H»s t =» 430
'26 Left =» 84
27 Tab'rY.-r. = 2
2 : Tcp = 455
23 Width = 2976
30 End
31 Begin VB.Sha e Shape 1
32 BackColor ' = &H0OFF0C00A
33 EackSrls = 1 'Opaque
34 BorderCoIcr = &H00FFFFFFώ
35 Height = 1272
35 Left = 9360
37 Top = 4980
33 Width = 2292
33 End
40 ELJ
41 Attribute VB_Name = "Statistics"
42 Attribue V3_Cri.it3.ble = False
43 A-ribntϊ V3_F.xposed = False
'? / Option Explicit lY.vate Sub Stars_Click0 iZnd Sub
?.iτr.t; 7ώ Commandl_Click()
,:eo r.-^ng Unit Progπ-.-n— age 121 of 204
7 if (Not (LearaMcdeEnabled) And (Not (RυnModeEπabϊed))} TScaai .•" rX=-iTolO
9 :7ati3tics.Text'Kx - l).Text = 0
1 Statistics.Text5(x - l).Text = 0 1 StvlΛics.Te^t6(x - l).Text - 0
12 Next* A End If
M 77 S b
• ._ .-.- ι -,;»Prcgπ:n— Pι>c- 122 f'
^33
7liO
3 ι:,-';v:.t3 Cab Cακmana3_ClickO
9 Filt-:r= 1.5
10 7- Stιb n F:ivats Sub Co.nnvαnd4_ClickO
12 Filter = 25 13 7:dS:.b
14 ?r*v.t; SYo FoπnJLcrdO
13 A=tivcFcnn= '"Stats" 13 VScrcdl.Val'ie = Val(TextS.Text)
13 "..'v.tiJΥVScrolll rrr-ι;e()
13 73:3tl33.Te.v:3.Te."t - VScrolll.VjLe in JS-.o
-7 1<
/ > rile >* !r.:s: t=pb.tas *7 Attribute V3_Name = "TCHPLib" This fir3t croup is defined: 6>r this specific 'program "Visual Display. This should be setup by 'reading the info from the sjstem via the API ' Public Const VdisplayTCKPAddr As String = "200.0.0.1 " Public Cor.it VdisplayTCPSPPort Λs Integer = 1250 Public Const VscanTCPIPAddr As String = "200.0.0.1 " Public Const VscanTCPIrøsrt As Integer = 1250 Public VscanChannel As "Integer ' The declares and defines below are used by the TCPIP subsystem, they are general to all programs. Public IsS ϊrver As Boolean 'True/False flag, is this machine acting as Server Public ChanneiInUse(5) As Boolean 'Keeps track of channels in use Publ ic frmLocaiAddr(5) As String 'G lobal to keep Local Machine address Public rrrnRemoteAddr(5) As String 'Global to keep Remote Machine address, for retry Public frrr.LocalPort(5) As Integer 'Global keeps local port number Public 1'rrπ cmotePort(5) As Integer 'Globai keeps remote port number, for retry Public Lis'.jr.L calAddr As String 'Same as above but for listen function (Server) Public Lb> er±ocalPort As Integer Public ListenRemoteAddr As String Public ListenRemotePort As Integer Public NetReady(5) As Boolean 'Global, State of each possible connection 'dsSocket Actions as defined Public Const SOCK_ACTION_CLOSE As Integer = 1 Public Const SOCK_ACTION_CONNECT As Integer = 2 Public Ccnst SOCK_ACTION_LISTEN As Integer = 3 Public Const SOCK_ACTION_FWDLOOKUP As Integer = 4 Public Const SOCK_ACΗON_REVLOOKUP As Integer = 5 'dsSocket Connection State Public Const SOCX_STATE_CLOSED As Integer = 1 Public Const SCCX_STATE_CONNECTED As Integer = 2 Public Const SOCX_STATΞ_LISTENING As Integer = 3 Public Const SOCK_STATE_CONNECTIΪN'G As Integer = 4 Public Ccr.3t SCCX_STATΞ_ER70R As Integer = 5 Pibl:: Ccn:t SOCX_STΛTE_CLOSING As Integer = 6 Public Cc sir. SOCX_STATE JNKNOWN As Integer = 7 Public Ccnnt SOCX_STATE_BUSY As Inteςer = 3
:.-vi "," '.3 '-.aging Unit Program— Page 124 of 204
- 'Ϊ>
: .777. 7rATEJJ'L?ACπVATr G As lnteger = 9 : SC 11 STATΞ. UPOACTIVE AS Integer = 10
7' liι Cc-. -! SCCK_ERR_CLOSΞJ As Integer = 20000 'Connection closed Public Cc-.ι„t SCCK_ERX._ SE*SDRY As Integer = 20001 'Memory allocation errcr i-Λbltc Ccnst S0CK_ERR_1SCL05ED As Integer = 20002 "Socket is already closed Public Cct.rt SCCX_ERR SLISTEN As Integer = 20003 'Socket is aready listening Public Co:..t SOCK_ERR_NOPORT As Integer = 20004 "No part number or service name specified
9 Public Const SOCX_ERR_ISCO ECT As Integer = 20005 'Socket is already connected
10 Public Ccru;t SCX:X_ERR_ISACTIVE As Integer = 20006 1JDP Socket is already active 11 Public Cc-.irt SOCX_ ERR__\YTNSOCKDLL As Integer = 20010 "Winsock DLL not found 12 Public Const SOCK_ERR_NOTCLOSED As Integer = 20011 'Socket is not closed
13 Public Ccnst SOCX. Ek5_INTR Λs Integer = 21004 'Interrupted system call 1 rublic Ccir.t SOCX ERR_BADF As Integer = 21009 'Bad file number
15 ?.ι ι;~ Co: rt SOCX ERR_ACCES As Integer = 21013 'Permission denied 13 rv..t>t:» Cc. -, -t SCCK RR_FAULT .As Integer = 21014 'Bad address 17 rώiϊc Ccn;t SOCK ERRJMVAL As Integer = 21022 'Invalid argument 11 IVjli : ."*, , : t SOCX. ERR_i\ IFILE As lntegsr = 21024 Too many open files !'3 Z'M. : ..t OCX ERRJΛOULDBLOCK As Integer = 21035 'Operation would block
701: 3 i.t SOCX ΞRR INPROGRESS A3 Integer = 21036 'Operation now i progress
21 ?ώ":3 - CCX ER ALREADY As Integer = 21037 Operation already in progress
.'u lic C". i.t SCCK SRR_ OTSCCX As Integer = 21038 'Socket operation on non-socket 7 1 ι:t SOCX ERR DESTADDRREQ As Integer = 21039 'Destination address required
2-} I'u lic Ccr,3t SOCX. ERR_MSGSIZE As Integer = 21040 'Message too long
23 J'ublic Co.-nt SOCX. ERR_PROTOTYPE As Integer = 21041 'Protocol wrong type for socket L-3 Yblic Cc .:^t SOCX. EF7l_NOPROTOCPT As Integer = 21042 'Bad protocol option
27 :V3U3 C,,r.3t SCCX_ ΞR JPROTONOSUPPORT As Integer = 21043 'Protocol not supported 2J ublic Cc.iot SOCX. ΞRR_SOCKTNOSUPPORT As Integer = 1044 'Socket type not supported 29 Public Con..t SOCX. ERR_OPNOTSUPP ΛS Integer = 21045 Operation not supported on socket 30 Public Co:i3t SOCX. ERR_PFNOSUPPORT Λs Integer = 21046 'Protocol family not supported 31 :bl!c Cc;. ,t SOCX _ERR_ΛFNOSUPPORT As Integer = 210-17 Address family not supported by protocol family Λbils ru .t OCX ERR ADDRIMUSE As Integer = 21048 'Address already in use
Public C Const SOCK ERR ADDRNOTAVAIL Λs Integer = 21049 'Can't assign requested address
3 't Public Corst SOCX. ERR. LETDOWN As Integer = 21050 •Network is down
35 Public Const SCCX.ERR NETUNREACII As Integer = 21051 "Network is unreachable
J O Public Ccnst SOCX. ERR NETRESET As Integer = 21052 "Net dropped connection or reset
37 Public Const SOCX. ERR COM ABORTED As Integer ; 1153 'Software caused connection abort
33 ->.,ι.ι ;- Coust SCCX ERR. CONNRESET Λs Integer = 21054 'Connection reset by peer
Public Cor.st SOCX] ERR NOBUFS As Integer = 21055 "No buffer space available
40 Public Const SOCX.ERR. 'iSCONN As Integer = 21056 'Socket is already connected
41 Public Const SOCK.ERR NOTCONN As Integer = 21057 'Socket is not connected
42 Public Co.-st SOCK_ERR_SHUTDO N As Integer = 21053 "Can't send after socket shutdown Public Ccnst SOCX_ERR TOOMANYRΞFS As Integer = 21059 Too many references, can't splice
.■0 7 .7J Unit : rani— age ! 5 of 234
^
(
7.3 7 ' ;
Integer = 21060 'Connection timed out 7.
3tic 7
3.._ D As Inte
ger = 21061 'Connection refused Yiblic C- :-.:t SOCX_ERR_LQ0!Fiisuaceser = 21062 Too many levels of symbolic links .Ti lic Cc.i3t SCCK_ERRJ*AKeϊ
*OQlLONG As Integer = 21063 'File name too long '/ublic Co.iit SOCX_ERR iII3S3I5SfSfN As Integer = 21064 "Host is down Public Const SOCX_ERR_FK!K!rffiNΪEACH As Integer = 21065 "No Route to Host Public Const SGCXJΞRR_N0rø«
*P
*nf As Integer - 21066 "Directory not empty Public Const SOCX ERR P?JGd
"ϊ
*V
* As Integer = 21067 Too many processes
0 Public Const SOCX_ERR_U5ERS As Jπteger = 21068 Too many users
10 Public Const SOCX_ERR_DQUOT As Integer = 21069 "Disc Quota Exceeded 11 Public Const SOCX_ERR_STAl£ As Integer = 21070 •Stale NFS fύe handle 12 Public Ccnst SOCX_ERR_REfι«l»"IE As Integer = 21071 Too many levels of remote in path 13 Public Const SOCX_ERR_SYSNOTREADY As Integer = 21091 "Network Subsystem is unavailable 14 Public Const SOCK_ERR_VEE*?;0!TSUPPORTED As Integer = 21092 'WTNSOCK DLL Version out of range 15 Public Ccnst SC)CX_El^_NOTiTOT3A lSED As Integer = 21093 'Successful WSASTARTUP not yet performed lι5 Public Const SC K_£RR_HOST NOT_FOUND As Integer = 22001 'Host not found 17 Public Const SOCX_ERR_TRY_AGΛ!N As Integer = 22002 -Non-Authoritative Host not found
13 Public Const SOCX_ERR_NQ_R£COVERY Λs Integer = 22003 -Non-Recoverable errors: FORMERR,
1? .■.ΞFU2ΞT , NOTIMP 20 Public Or .:zι SCCX_ER?v_ OJDATΛ As Integer = 22004 'Valid narr«\ no data record of requested type
Λ.ilie "r uction ClcseLi.ten() As integer
22 C-.I7J ivlncn the listen channel finds a link. 23 'Always returns 0
24 2n Error Resume Next
25 YnCoin.dssccklisten.Actiori = SOCK_ACTION_CLOSE
2/ 7 ud Function
" 3 Public Function C!csePort(3yVal Channel As Integer) As Integer
29 'Closes a port. Pass a number greater than 4 to close all channels
30 'Always returns 0
31 Dim i As Integer
32 Ci £r.-3r Resume Next
33 If(C ar.neI < 5) Then
34 frπιCo;n.dsSockεt(Chxnr:e!).C!oεe 33 Ch3JiιιelInUse(Channel) = False
35 Else
37 For i = 0 To 4
33 frmCom.dsSocket(ChαnneI).C!ose
33 C annellnUse(Channel) = False
40 Next
41 End If
42 ClosePort = 0
: ;m 7: 3 U;7 -Page 126 of 204
~Λ' >
'> ',-;. ■ -. .v. /VuIDEsaM! .Vs ϊntϊ'.r) Λs Boo
5 . . :' . . ' •" .33ctτιr.t.#;κrr...,> emy OPEN
1
3 '. -, ."rcr 17:3u.r:37 : .C€X_ACTΪON CONNECT
■ T,^
777.: :7:ι i.'l J..7771. (7y 71 LoiiiAclr As String, SyVal Lvca.Port As lnteg3r, RemoteΛdαr As String
1 .7.U :7 :.7J i.ιs. Λs .'.3; r
> ' .'ur. ti - .1 ύrlaiiijs a ciier.t 3 DI...rction to ώe address provided.
! '-7."r.'.-. •! if cror, 7;-; the n!.;r..';3r of the channel oper.ϊd
5 Vzi the lϊtumβJ chapel numo-er t.3 diir.ct send/receive mesjagjj.
J Dica StΛil'.εt, Grer.nel, i Λi Ints 7r
/ Olra ,:■ irk ;.s Integer i 3 Fc i-OToiStea 1
13 lι"(i = 5)Tfaen
11 IiiitClϊe tTCP-lP = - 1
12 Exit Function p ... la ..I;.-
1 ' !f(Channel'nUse(ι) > True; Then
1 C Janae;l:'.U3e(i) - T.-'3β
I 5 Channel = i 17 Exit Fcr
I I End if 17 En It*
- ) 7... t-=O?en .ij t?0rtfChanπei)
31 ;f(fnr.Coπι.dϊ3ocket(Ch2r,nel).Srιl3<3>2)Trιcτι 'Ccildn't open I'.rt
32 iι'(lsScrver = False) Then
33 fniiCo.-n.TC tnTimer(Chanr.t;I).Enabi-:d =Trr..'
- ■- 7se
3a frmCom.ListenTir. T.Enablei = True
37; End If
37 End if
3 ' InϋClientTCPl? « Channel 33 If (InitCϋentTCr IP < 0) Then
10 j r.k = "vfcgBD.xC'Error Initializing Communication, System will " +■ Cr.rS(10) ÷ ChrS(13) + "Continue to 1 iY'.ry!", vbOKG.iiy + vbAppllcatior.Modal, "Com Link Error")
P EπJIf
'3 Exit Funcion
' • Er.J Fancticn
45 Public Fir iciicn IniϊServerTCP'P(D Vai LocaiAddr As String, ByVal LocalPort As Integer, ByVal RemoteAddr As -' J String, ByVal RemctePort Λs Integer) Λs Integer
:.r ■: riUr 123 cl" -0;
Λ3>
'7-*- 'ι . - cuon for .' -. ..-. l.ocnlAddr must be "0.0 0.0" to
'.7' i'-'i -• 'fY m .or v is encountered or 0 if a n. ■ιcr "v.arr,.ικ;: ' . 1 ,," . 10-1
5 D ιτι C ir.:Ret As Inte gc r t 0a Error Resume Next
7 LocalAdGr
3 Li.teiiLocalPort = LocalPort
9 ListenRcrcoteAddr = RemoteAddr
10 ListenRemotePort = RemotePoπ 11
12 St-tRct = OpenServerListenPortO
13 if (fenCoπi.dssocklisten.State o 3) Then 'Couldn't open Port
14 lnitScrycrTCPI? = -l
15 Else
16 JmtSfrvcrTCPIP = StatP.e:
17 End If
1 End Function ir> I u7i: F'-.-uicn CpenCiier.tPort(By\7ι Channel Λs ir.ieεer) Λ . I- teger 0 '7u.ic.c3 Opens a client port. Normahy "ailed by init nincti rri 1 . 'r-r-tms -l ca error or st le of channel d. fined oy SC C.< JSTΛ 7". 2 3 T 3i. - Di.-ι 7;, S t Λs Boolean '- C n Error GoTo ΞrrorCocI i 5 'Vl.h fπnCora 6 PrevSet = False 7 Select Case .dsSocket(Cha^n zi) S'.re j Case I 'Connection Closed 9 .dsSocket(Channei).Actio.ι = SOCK_ACT10M_CO K7CT 0 Case 2 'Currently Connected .dsSocket(Channel).Actιon = SOCK_.\CTION_CLOSE 2 While (.dsSocket(Channel).State = SOCK_STATE_BUSY) 3 Wend 4 .dsSocket(Ch2nnei).Ac'icn = SCCl<_ΛCTION_CONλrECT 3 Case 3 'Listening 3 .άsSocket(Channel).Λci:cn = SOCI<_ΛCTION_CLOSΞ 7 While (.dsSocket(Channel).S:a.e = SOCK STATE_EUSY) 3 Wend 9 .dsSocket(Chanr.3l) Action = SOCK_ΛCT10N_CO;".\'CCT 0 Case 4 'Stuck Connecting 1 While (.dsSc*. et(Chr-inel).jia-e = SOCK STATEJIUSY) 2 Wend 3 'See if this is OX or gets stuck 4 Case 5 'Error Condition 3 PrevSet = True
-" lm '..na U.i t Proeran— P. _• 12' of 201
. , 777 -in. I) Action - SOC _ACTION_CLCSE e El 'Ail orrtr static dsSocke:(Channel).State
,7;7t Ire /Set) Th n Op
asSccket(Channe! State "πr.Cun.LmkUpTiπier.Enabled = True
17 Opi-.Clien'P'jrt-ΞrT 1
; ) .17 jcticn
; » ret m
'.ιPo7.f *s integer . >. Li.t.n j'-it firicrver. Ci 33k c ; sure a free com "....! e
's's. Returrs-l cncro:, , .r .varninj, 1 if OK 1 i 7.3 Inti'jsr
'..73.Chu.1r.3l Λs 177.: ι 7.τ"r R:rιrι ': t
Fι!s' ) fnen
J Exit For Z id If
33
3 E d If J / ' '1th .πr.Ccn 73scck!i3t3n.LocalPort = ListenLocaiPc.t 'Globally Set
33 .dssockϋsrcn.LocalDotΛddr = "00.0.0" ,3 .d-cocklisten-Ac-ion = S0C7_ΛCT10:"_CL0SE 7 7s3θckIi3*en.Λction = SCCK_ACT:0M_LISTEN
Th .1
Tπ.3 OpenServerListenPoU = -1 Eire
3 Lr it Pro--' -Pa'. '"0 of 201
^λ
,
;.?crt=0
•c . .. :
5 7 1 " -::7.ι
6 7. ili i 7r. ;ti .3 jnitTCPIPConιπιa.τd(By Val C&mnel As Integer, ByVal Command As Integer) As Integer
7 * : .3 Zza c a open char.nel. 3 1 i Yro jsuinsϊ'sM
9
■.":>..
'rraCoα
1 2 ;Sockeι(Channsl).Send = Trim(Str(Conimand)) 2 If (Err = SOCKJϊ X .VOULD3LOCK) Then 3 ;!s»Ready(Chanπel) = False 4 Yiiila (NetReady(Channel) = False) 3 Λ'end 5 .7s3c k-
3t(C annel).S e d = Trim{Str(Coιnτπand
")) 7 "77ιtTCP"FCcrnmar.d = 0 3 9 ' '7.τ>0)Thιn 0 :.-.itTC?
'I vli.-. ' J -3i 1 7"(!slv.>n-."r= ι7ι.) ir-.-n °. .Lisen i
'l.i icr.Ξr.ai: le J = True 3 773
' !■ .TConi'il.: 77: a.ιr..D.fl.ub: .-d = True 'Re-Ei.iab'.ish Connection 3 777 3 7 lit
* 7 ?.,d if 3 '
■ i V/77 3 77/ :tl..ι 0 P-.V.i
': F-.inction XnifTCPIPStringCByVal Channel As Integer, ByVal Data As String) As Integer 1 7. r. .1 : on open chr3ir.il. 2 '
" a 7 r ;r Resume 1 ' ext 3
■V;-.ι:Vr::Cc;n 4 'T.y to Send Data 5 . ! :ockctCChan::el).Send = Data 6 7" (Err = SOCK_ER-77.VOULDB1.OCK) Then 7 .
ι'etReaJy(Channei) = False 3 ".Vhile (NstReady(Char.ncl) = False) 9 '.Vend 0 7
3Soc ;i(Channe;).Send = Data 1
AnιItTC?lPS-rL-.3 = 0 3 7!.o 3 If(Eιr>0)Then 4 .'fcnitTCPiPSirlr.g = Eτ 3 If (IsSεrver = True) T7-;ι 0 .ListenTi.r. ir.Enable j = True 7 Else
:Pι 3.-- - Page 1.11 of Cl
I
1 .rCcm'fl. - .i (Cho.ir 3 !).Enabied = True 'Rtt-Estibiώ Connection If
. i-ϋCCΛ'.C.l
7 i
77. :; i.'. )
CiliniY. = 0075
Cϋtnl'-Y,- - 1710
10 Cli.n:'.' '- .. - 1330
77 jl.'. - 2970
L3t = 6015 'Λ'.'.C.C 7 - "Foπnl"
./. i J 7 ι" i ' 7 i ; .;.' •
.' ) ii :
5 .' .. : - 1
1 '■• -. I -- .77
"; -■» 77
9 ) - -75 r
7
' 41 j ς'n 77c .Llb.iis". diet .Ssc' -.'.
43 I7i7t = 42.0
43 Yd: : ' 4
.1.; . ■> — ..•-: »
)
)
X7.
0
ds3oc 3t
t 33c*<3t
-_ " .. I - " I
^£
<ι-.scc t
b.YiYYcctc"* 71.t
•ι:s r:
l^>
7
29 » r - , = ' 7" *• Abn(7r YY/al))
30 Yd;
31 ti
.3.2
_rv33 ' . , :- * ■ 7c - t_C'c:oO. l-tΛsIr.'^r.E ,-rCods Λs i-ϊS.-, ErrcrDess Λs String)
'34 '.liii./..7...1 Yna-orY ljcicssJ
'•' 33 33-.- . 7: ., a lc :) =■ FsL-3
AA T2c.:.T.7ι ..(I.7..-).7-
7.rv;r
' -*41 CIi3r„ 11.7.3 ;.: 73 • T.--.3
"*42 L:-:. .7. r.7"' l = Tr :
7 / )"
) 0 i
> C l
3 7 IL
„1) i , '!>
77t ; l \i7,
413 ι7 i r
1 1
'31 .4 )
1 ^ Λ
-J
.'7>7
i *I it .-..17")
= 7J
n_≤... 'ciiTY -C 7 : -, 7ι. 2 scΛsCr
>>
7" it 'Trers '73« 3 ΠΓO-J
J^°
. '.) .!> „_
..13 / i : 'Lstcu' J n . ' • -" ' -t •> -
/ TT i 3 C O^ -i 7
'V 1' 31 ' >
C. 'J 1 o .3 ii' t.s ra rv iVirccTira, cs
15 .• . i ' _, V ■>' /, π ii f/ ι-e.(7ι
15 1 l.» .3 • , 1, l(.-3lS"C31-ιt .. 1 vl
-1/ 1 3 ,c'c t*3 v 77 i ', Jr-j i
^) c I -', CI i l l" ' . /ic t, / i L7
25 ' lc"; .7 ,C.3t"υn = "7iι Ci -f- ι77" -ι ii -ι.ι
27 Yπyπ^LrK.' 2!
U
-, 33.,C3n:;l. ιL7 r, ,ι k ' V .-.ul '
»3")
ζ3 Cα.lClc ..7 (D)'cO-3 Vraa.1
^ I ^ 1 ' ■* ■*
^
4 7 ..117177 :ι..~-.3r_.'-.i3i
5 7 '..-i iΛ37ι.:;,;r
5 '.'IVUT'I) tlivr -,t:ιi '.:; .-. - n 7.. Yi
J ..izi" CC3...7r 3 - I is i. it,
„ c -!.;!.: ■■ t
ECT2D) Tr n
S7
y'f.'f
3ϋ"-.
S 2_
7 I 7».π» ι
'r
(>
/
ΛS >
3ι Λ'..\7
',C70 o- • v. cm
-' .v .! / w.v J -
* / ""-' ' 1 " :' c-c- n '17
Υ'"7i : "...,
-
-AS
.'
" 33
,73-
'33
• 3-'
37. 7
":33 1
- 39
7-40
'•••7 1 b '.'
. 43 /*V"77I".7:- t3rn:ι
7- 44 .'7.-:7. CC>;TI".CLΛ CxCCOO
45 7.77r.;COM7.GA CxC 301
as 5"
1 5
YC
0x0. '■> 0x7733 itf?::
}χf7 -
-■?.- J ' ' t" Y TCO'ΛT* 5 7"3I7VΛlΛl'_"'")
IΪJ /»?cir.t3r'3 li3.\' ... / ' ':-v Cv 7-"i r.-^'it r. -*'
%&3' '3!'7- d ch3r r*. J- >m ;,.. ,-.- ;]-vui3'jruJcJι 7.-r » ΛbfiCαoi3; fD, . /'?cfctjri->VGΛι--j '/ ϋ-". ;tm3i-.:lch3.ι-:.r+ π3 :. r ( --7 ,.:cd ? s f-t *)0xaCCCCOCO;
-iil 1 '" ..J' iiϊi'-o 1 int (7 'vipnr-rY.. -ό^ed int fcr *χMΛ\VBASE + OxCόWOOO); fl2
•' . . ;-'ri'7.!c'- 7 7: :
■Z Λ" 33
' (Y,7 icJrhr y
\ ,37 7'IGOO"; /* >.as 0xbe40ζ 300 */
.ol cc
0x0f7\
.J^S
)>).'' I t i'
«' / .
71 , D\ ; :, ,< JI . - 0x1773, <127. xl/7. t!I.' 2\31 D, - O l >, , 74 / 2 5x_ / J3, ( il : '. 7'"', 0, 77-1 r
•r 3 3 70, C <- .- .ι> v.. >7
' .xl 13, x"" 5
' 7
* • - ■', 7 ',0x17- cl75,ι '., '
-25 ) < 7.7, - 7117 *■ '"7 P, 07. ι3, - \ - . ' -, 25 < ,..', 7 ! ','7CJ '',".! 5.:, 3 1 ' ', * I' ' 2/
23' , ' 7 *'"7, 773 , "xi/ 3 <
33 77, 717, *7210, 0\3c3-3, Ox 7<\ .x 31
31 :.3'", 7357, 3x263'., ,xl77,07:
32 211 , 3-227, 0x2.03, C\7 "7 (71
33. ' 3 L'.J, 3'", 3 "*".-*, 5 7' 34, ,-17-3, .<13 t /'t 17.7, 2135, 0x2231, 0x2:53, Cxv CΛ, K. <. i\ l.v
35 { OXJJΠ, \ Vd 1, Ot.OSf", D l 604, 0 !7.3, Cxi S3
33- 2103, •* -2201, 0x2c03, CΛY 30, '771 '. J3 G2C V
37 \ • •■.' ', 371, 3'vθ: 3, ;.xI£0',,Cxl7.3,v,<IS5
33 *77V til 03, 5.x22c2, 3x2:03, x06.0, 0x71 "Cd* D D '/
33 (333.!, •:07J,
40 577 \ 2103,
41 }
A'l 3d 7t v
v/HC[] = { 0u3102,
45 to "
* ) . l7
{ 0x0352, 'J-tt
/' 3 : i j.-,: L. 3 -*;casu37C13-... -J t 1/ 3:7 7 : ." . > V" ."T"_", T setup '/
: : t 7.
s6!
j ; , , J J.Ϊ-.tie ώv-i-i dtυ.'x r
>*£ ' I'AI C Λ.: J.OIΓ J a tire r;r„ώ" cAi, r; ">ι r , ' '
. ' , ' "3(77?- "* \(')7't ! '3ut2l 3csrotrΥ V
9 ' :•.__" ;d*ιtV7l3<iMιs.π-{
. 13 i v7 C,:.r 30, Cx.OCO, OxOCGO, OxCU'*, .. ,υ0, ι,,..7, 7C 0, "*. 711 7130, .3.'.730, 0x3000,0x3000, OxCFF.3, ,xt,v70, 0~ C CD, OxvO.O,
■ AlA ' Y5.f, 575.1 3 C:C ,Oxθru 0 C,ff, 0x00.0,0x037,0x077, i„ i j - 7 ,C . D3£ Cx.030, C.xCCOO, OxOlff. OxCOOO, 0x07.3.2,5 "3)
1 or-y '/
i
I 1 1 »l 77> c.'i >.71 KCι.11.
27 '-'
3 * t
α-
3 { 12:71230,1920,17V
' *2
)7C 77237„ 0.227o0.7
"Y,23
J,
21 '7 \ », 2 ',12 J I2.1C2 ",1321,-1, ';
*3 7"ιl t d/*;idx7'l ■ { 15,15,21.15,15,2), .5,V, ', 5,171. 'Y .15,15,-ι ,;
' 3*1 /*
32 -
33 /
31 :,-7. t ;.,icrf-nr---[J =[2,2,3,2],
..3 "7:* 7.73- λI:-Aιύ:3-.;
" ' 33 .7": 1 t ./32f/;33="3", 70 = Yv"32i, 1 = -vJ2 J '/
'- tr_V i i etT:- 3; /* Qxcb = ,?tfV 3, C 9=- YX
-"41
' -'~l l t oar ld- 2;
'/
7
^Λ β4
7 ,rs''
9.
13
■ M H 1 V'v.3 1 ! '1
A3
15
.17
13
.19
- 3
21
22 ,.C 'M X 7, 0. ; . ,. r "3 ".t
•23 J 1 c . < ,
-2J
23
2>
2/
2J 23 /- r . l i ' J . t -. : 33 31 ' 1 7' ' "3 32 33 ; ' CC7JT7C77 731); /• γ' ?eriπrg3--ort .mb'sd */
J 1-
33 35 ;.
'i-- t3r
"/SY73 '-.a ftr-a cffviv
'jj Irput pert 37 33 33 43 41 42 1 v 7''- L
' '_
" --lc'Cl 7 43 C ■-
s.» 44 31 ; /
♦ vis..run- :sp J t iiiώlv- V
^λ 6 )
11 I - i -7 37_of' 1/5.7C. V
A2 /- Fr-[ι] * 77717 »)(7. *
< ,■•33.(77237:- 77I>JO. , .77" t -i ,._ [ι -(5Ϋi7.; -> -.* > i' -t.11 .
* 'ι=O, i"-733o"(7/32_3fTs:t5)/si2eofi77.'32.c .Yr'ei); i
.'/ "~2_;>t-[!3 = QYIΞtTr ») ( *. - "77_v. *.3t. [: ),
i...ι;
'
.*: i- (i = 0; i < S7ΪO'T-/32_C33'3)/ sizec:r732 :.::.*72]); !+*■)
V/32_;3tr*i] = 2 'ASZLPC-IYCelsctcri:], 2x7.0 + 7'32_ . -[.);
-A
._.■■£
. • *■*
7.7-7
3 ;, 3 ■»-.'.0. t ; -7 .':
_. • : .Irar.:..)
Ox ..700
1, HI'vVC.7D(CL,tDr.t?[0
*));
- &
•" '3 " .-vrcM = (.•:.*! .- )G?7/037D) „7;3<< 15" C\.713);
- 1 ....1 ■=(-." 1.7r ') ( JiYO D) αj>. 3 « 35 | CxCC CO);
^
3 Ό
A , _>1. v Ail".
*' f . . * ' ' i :3.3.2.C " Υ -• 7
; 7 ,-'. 7 •r.'- ,, : - •
/ ,
- ! . ' 7ι πiO "-r^ι:; 13 v .v.'i-- 13 - 3 .-, .vd3br-ι •: , άf 23
»r •" - ι7! 127'- )•::-)
" ( 7. 371 - . : .'7 - ' '"' '-*•
* 23
25 - I .!) ' 3. 7 - A" : 1 _- .■ v 1 ' -■ fs
^ 27 v .5 i ' 3 ' . ι .. i ' • - 7
7- - 3 /
01f ['* YOtr,;
^\
i\
! ~V3;77 j
,-ι 77 A
7 ...1 317,73'
uncri"/
:.x- - -,->-ϊi5i of:
ΛX
32 7 r- ' ■* - ; /* 33t cor._r.l r. to 3 V 3...TCI V
10 7...v.:); .'••s.β Cmihi'i */
11.
12
D; : 3 il ' to 1.,.:.'c3js *3e',L"en jri s.
"'14'
15 t :t •)
15
17 •FK
-.13
'15
21 „ * ..• \, \i, I .f"-*" : ,Ccry'V37CTr" 7- 3-..2 -); .772 ci '
t 2 on V
-:L.-'t3: .---—:■ ;i ".S3 at" CO I
/, 73iϊCjfcϊS3i;κ ϊri3 S A*.************* ***»* *«#αtτ.»««*Φ*,i.«*****Φ««,«**«»^
0; '.
Λ'
6 7 3 0
13 19
?1 7.c .'■ : ::cι7} »c:7- c "....,c i . :.. ■.,'.;,..- -ιϊ .!)
26
27
23
23-
30 7 C'33.-"r.L"p'7?-rr.-n3ters V
31
/* n-7 civis:b,5b 7 r.zcz: : .A 7:.:;
3J > ,c7- . ,x0:7;
_ £
." rt .- '"7
' iιιfcr._3v.l '/ .'".r.2, ' ' -t.-n i. ' -- -cd '/
707-7
7»
. i .. • . I.J.M.IΪ TI' -V-".3,y> « ;,:...3ι !>.,,..."y,."—"- ■'»•"— -- • -/
■ψ, ' ■ .:, . :7.' ,ΪI;Ϊ::,33337-.I,3..-viϊS,3:37ay,ydelaY,ylMtor,rraιr7):-Q)
5'"
6 I
9 , . : ,ι - .i.'.3.-:: .iy-raticcstKiarcrcrcp */
10 */
11 -, " .. : :.f 3;7:\;.' 73,r.. -.3f.fetes,in*T5Sjcsc3l.,y«:-.'2xstart,ystart)
12 : ' ',: ...3,7'..-. ,:; :.-Λ>-;r.-t.3£-3.««.3C≥Jβ,&π-.ιs5
13 4- 3: Y' 7'7
/*;. ■ ,77:77.7 V
5 •V..p-'-'T) 6 ( ;
"" ystart is Interlaced
/ • */ 7 /' i t 7 ,3 <.;.;-. t i.MA port :r.c..7. *l
/' V
---_ • 73. 7 i" -'3,.*:πn:.t,i7-.r;3,:r.-,'r^3l33,3 ::.ri3,*:r.*.3r733) !0 :.:'.. -,' :.' r..t, .".."rr3v,ιnvrt33,cτ-.'3-jiϊ.i^33ricc™;
71..': Pr.-rr- f2Ct
U
1 */
, 31 / ' :.-t *:.- - ,3 r-crt ccntrol poit */
, "' 32 _-' ι7c.γr'*,_ _iϊ1τι*:ςi3,L\_coιsrπ*.θ ;
'. 33 , .(((-3.l3=CrM33.\_7'r3C|;r.-.Dώ==CA.MΞ A ?AL_640)&&.(invrci>240) ),|
,, ■ 33 ,/ ( <7ι - 1.--=CA.\ 137\_PA3 )7 "7"r,vr:s>233) ) ) ~
33 I "".v:'3S 31: .73:} - 33 _outp{CΛTC_3_DATA,_7-j(C TC_3_DAT.\);C.'.02:;
7
_3t .\C 73_3_DATA,_: .?"CRTC_3_DATA i0xf 1;,
4!
L". t ?."" ". • " ; I£ j ..f.77
773
13 t-.- YSA: S 3 Girt Address
1/
Jϊ(-
13 " c- . -t VGA ::. i<3.i- fcar..
■ ' 3 I'ir.'i.'Λi.K) -Λ;
33 _o.i773Al.7_7 I0,((.77;« " -;sf3>+(-.7: 3370xC));
39 _C73'711 ;*_3.7 :.;_REG,(r.:b3r373.-t30) {'-.πb .-3»4).3733"7;
7J j
41 ;.::7: > *'
43 7 .: ' ι_, M • 7 i'-'- •' rr.'-tr.7.-3S3 U ._ 3.2z '.:' v3:..-3
- S 3-D
5
1 ' i7 -7- 7' "° - 77*Λ '.
; 33; =.- -7' 17-33t'-3 ιesi y,
9 ' ".-,. 'i.lc.'i)- ;-:j.-s on3Vv ;:rrv-,
:0 .- "i.'".- : .: iLJ.-3c.(bα
11 - ".7);"
12
13 /
.14 / 7 :t_ , _ .3θ_τ.o - s«' v7-3ui»dc UMiig VESA '
■ 15 ,' vv cth-rsuccessi i.
23 ; .. V:CO 10, 7:'i, ir?;A;
21- .(...-727' .73235 ,ι
, 23 -. i. 7
T
*.~/ .' »
27 . 3., 3
23 ' -•
37 rerαra(O);
}
33
33 )
41
7-2 J :.
33 }
*
•13 ;':.' ■/ i -•: ;_ι - 3 it VGA hαrdwas ocm
- T' '. -i ; ' --κ: 170 of 2
*\
*,- j
*/ l £ tea-!
• ■
9 - 7.73.YΞA"
"*C
'-
' Y;.; ,"*κaida*:ι 'I ι . "7 ill •J.ϋ.-»=-J£tai0ι. -ϊ;
7712
13 ," ra^dctaAOxbf .14. & to?sl3 '
"13 _c c{.Vr3.7'33X,cht:); '"'write data i toegis 7
19 _337(A7C7:7Ξ3 ?AS); /"•-restore BIT 5 Λ toggle '/
29 _ " .' .''- -' "'7- VJ3 'I73<,'3?:09*';
21
212 _-. t; ^C."lTC_A_£?AT.\,_ ?{CR.TC _Λ DA i*A7KC );
-23 7 3
733 ;-3_Λ_3\\TA,_ -- iLTC_A_ .YrA ",0x7.7; 1
30 i.-.t '.hi ..:.','- .': ::.t,contrast,sliErp,sa .ur, 31 { 32 L t ;;
40 c τA.rλ- ' - .»I; /'convDi-f m -to?' 7; V
-J! : .t-j t»l; /*
ircci :o 71: 7
^ Ur.it -e-r n— "V.ι 171 of 27
αsz.
i .); 7, . J. ,iu. ύ ..,
/* us sύ. ■ 57- jjvalid input */
i 7' : . -i'J-OxOjqnMBvSKn.
9 « : .' r f .'_ 20TUJIG, Zi?„ : ; fe£lrcτ using sharp •/
10 7 Λ3de71 lCIciiimnelliC."ςO'i{'( rs S===Ox06)
H mcdi7110[chacΛcl&fisj()IiJftHιnode7110(chaBiel&<*wOlf][*]&0xff80)|
12 (shaιpά0x7f);
13 , * : .'ii o J color purple PAL *t
14 ."2.01'vh.zn
15 ' 3 1..r v.0:i2C) /""itssaiteπtaSβ color vectors */
16 ' U.ιo.-.7π0IchantMά s01f7{ϊ)l=0\0!;
17 ./... 73 l :n o! 1 moώod ??? 13 /
1 • > • . _> I bit c i Viper convoi . c * »/ 0 .7_ -3.70xS0) Vast aireπidtβ color vectors*/ 1 .c3crt3ct(Oxffef.0τΛBWβ); /*lo on 2 ' i 3 - 'rt 0 r:cf0Y;1?.ϊC); /*hiaho:f "
3 1 <, V U 7.37113,mod;7110...mnei&OxOl f][i]»3, 5 raode7110[cha∞rf3Ϊ:ϋxO 1 l""[i].20xtϊ); 5 7 } ° 9 173 - i. K 3GΛ C3ITH_CHAN0_VCR)
,tvπaC[i]»8,tv71 )0[i]&0xS);
5 } 5 } 7 - : 3 ' 9 * i "(,'r71i:[l]!-3«.:D 0 ' 1 i2.(7V?JTE71 lO.vf 7110[i]»S,vtr7110[i
*v.7
*luT); 2 ΪH-; 3 }
' 'I ! Λon3τ72r:ι— Y;c 172 of 2C 1
251714AB & 744 "I L = 1 (triitate) */
19 ;." -rn rι=CAMERA_PALjS4l9 /* change alignment */
20 ' {
21 •."ύ^haaαelAOxO: O^RGB BΛNO)
22 i2c{ RITE7110,pe2!.«5crcp7n [l]»8,pal640crop7110[l]&0xϊ);
23
24 ;2.(λVl"UTE7110,pϊM^ 1^
25 }
2 ,* " : :. - ;i~ r .i.-.v ϋiro aPAL *"
27 //; : 33.70) /• use altasiatε co!oι vectors */
28 // '{
29 V ϊ=0;
30 ,7 wiiiIe!'mode7 i 10[channsi<Sώ(Mqi']l= )xfϊϊf)
31 .7 {
32 .7 ii (racκie7110[chacaaett0x0iη[ι>>8}=ϋx0e )
33 // tem =H.π*«Ss^ 10(channel&0x01 f][i])|0x01 ;
34 ,7 i2c( RITE71 lO.Osteffmp);
35 ,7 i-H-;
35 // }
37 //
39 /' V C /' :.t_\ 7 -;r_pcrt- S viper port msfe. */
41 /' " */
42 i..t _3t_v;_- ;r 3ort(:r.od3,forrnat,irihj-^'Bres^es,yres,xdelay,yde!ay,yfactor>irame)
7.r ■; fnit Pro.ιιm— PΪΓS i73 of 204
outp(CRTC_BJNDEX,VERT_POS_HIGH), outp(CRTC_B_DATA,(unsιgned charX(vertpos&0xfTO0)»8;l /• VERT_HEIGHT addresses minus 1 * vertheigth— ; outp(CRTC_B_I DEX,VERT_HEIGTH_LOW); outp(CRTC_B_DATA,(unsigned charXvertheigth&OxrT)); outp(CRTC_B_INDEX,VERT_HEIGTH_HIGH); outp(CRTCJB_DATA,(unsigned cnarX(vertheigth&0xffD0)»8)); /• WIN_LSA addresses on a 4 byte boundary, 2 LSBs are ignored •/ winlsa=(winlsa»2)&0xfff f; /* drop 2 LSBs and mask to 20 bits •/ outp(CRTC_B_rNDEX,CRTC_B_LSA_LOW); outp(CRTC_B_DATA,(unsigned c arXwinlsa&Oxff)); outp(CRTC_B_INDEX,CRTC_B_LSA_MID); outp(CRTC_B_DATA,(unsigned charX(wιnIsa&0xffO0)»8)); outp(CRTC_B_INDEX,CRTC_B_LSA_HIGH); outp(CRTC _B_DATA,(unsigned charX(winlsa&0xfTOOOO)» 16)); /* ROW_OFFSET addresses on a 8 byte boundary, 3 LSBs are ignored •/ rowoffset=(roworrset»3); drop 3 LSBs */ outp(CRTC_B_INDEX,ROW_OFFSET_LOW); outp{CRTC_B_DATA,(unsigned charXrowoffset&Oxff)); outp(CRTC_B_INDEX,ROW_OFFSET HIGH); outp(CRTC_B_DATA,(unsigned charX(ro offset&0xfR)0)»8)); /» PIXEL_PAN •.' outp(CRTC_BJNDEX,PIXEL_PAN); outp(CRTC_B_DATA,(unsigned charXwinctrlO)); /* COLOR_DEPTH and vertical zoom */ outp(CRTC_B_INDEX,COLOR_DEPTH), outp(CRTC_B_DATA,(unsigned charXwinctrl I ) ); Λ set window port control */ it"(enable=l) { outp(CRTC_B_INDEX,lMA_CONTROL); /• enable window */ outp(CRTC_B DATA,inp(CRTC_B_DATA)|WI DOW_ENABLE); outp(CRTC_BJNDEX,CRTC_B_CONTROL); outp(CRTC B DATA,WINDOW_SELECT); } else { outp(CRTC_B_INDEX,lMA_CONTROL); /* disable window */ outp(CRTC B DATA,inp(CRTC_B_DATA)&(--WπMDOW_ENABLE)); } }
Burford Video Imaging Unit Program — Page 201 of 204
ss
J j* ************************************************** •**••*****•*•••**#***
2 /♦ */
3 /* Timer Routines */
4 /* */
#define T1MCONT 0x43 TIMER CONTROL REGESTER*/ #define TIMZERO 0x40 *T1MER NUMBER 0 DATA PORT*/ #define TO 0x00 /•CONTROL BITS FOR TIMER 0*/ #define MSB 0x30 /•LOAD LEAST THEN MOST SIGNIFICANT BITS COMMAND*/ tfdefine SHOOT 0x02 /*MODE I, PROGRAMABLE ONE SI IOT MODE*/
Burford Video Imaging Unit Program — Page 202 of 204
HG
#define LATCH 00 /* A CH CURRENT CLOCK VALUE*' ^define RATE 04 "SAWTOOTHED MODE*' unsigned int far *B10Stimelow l6 = (unsigned int far *XJx40006c; unsigned int far *BIOStimehighl6 = (unsigned int far *)0x40006e; int savcBIOStimehighlό; unsigned long delta; void tinit() /*routine to re-init the system clock to the right mode*/
{ outp(TlMCONT,T0 | LMSB | RATE); outpfTTMZERO.O); outp(TIMZERO,0); saveBIOStimehighl6=*BIOStimehighl6; /* get high 16 bits of ticks */' deha=(unsigned loπgXJ; /* offset value */
} /*routine to return a 16bit counter value*/
;
low8; /'low byte of hardware clock*/ mid8; /*next βbits up in hardware clock*/
do
( outp(TIMCONT,T0 I LATCH); /•latch the 16bits of time*/ tim.b.low8 = inpfπMZEROyOxff; /•get Isb of lower 16bits*/ tim.b.midδ = inpfTlMZERO Oxff; /*hack the last 8 bits in*/ outpCπMCONT,TO | LATCH); /* latch again to see if match */ low = inpCTIMZEROrOxff; /• must read to get next byte */ mid =-- inp TIMZEROrOxff; /• make sure mid was not overflowing */
}
/* must not read near timer transition */ while (tim.b.mid8!=mid) ; retum(tim.timel6); } unsigned long ltime32() /'routine to return a 32bit counter value*/ { int comparehigh 16; /* compare high time to see if time has rolled */ union
Burford Video Imaging Unit Program — Page 2,Z >>t'204
A i\
unsigned long time32, struct { unsigned char low 8, Mow b\te of hardware clock* unsigned char n ιd8: /'next 8bιts up in hardware clock*' unsigned int top 16; "upper 16bits from BIOS RAM clock*/ } b; } tim; do { do { tim.b.topl6 = *BIOStimelowl6; /'get lower 16bιts of ticks*/ comparehigh 16=* BlOStimehigh 16; /* get high ! 6 bits of ticks */ outp(TIMCONT,T0 | LATCH); /*!atch the lower I obits cf time*/ } while (tim.b.toplό != *BIOStimelowl6); /'if upper bits change, try again*/ tim.b.lowδ = inpCrTMZEROyOxff; /*get lsb of lower 1 obits*/ tim.b.mid8 = inpCπMZERO^xff; /'hack the last 8 bits in*/ } while ((tim.b.mid8==0xf*f)&&((tim.b.low8& 0xf0)==0xf0)); /* Reset occurs at 1 ,573,040 with a residual of 176 in lower 16 bits * ' /* 176*65536=1 1,534,336 '■' ifljcomparehigh 16<saveBIOStimehιgh 16) deha+={unsigned long) 1 1534336; saveBIOStimehighl6=comparehighl ; return(tim.time32+delta); } #ifdefNON_VGA_ABlM void reΙDPMI(void) { FreeLDTDesc(5, NVSelector); } #endif #ifdef NON_VG A_AB 1 M ''include "utilnv.h" ■'endif ''ifdefNON_VGA_7!4 ''include "utilnv.h" #endif
Burford Video Imaging Unit Program — Page 204 of 204
Λ Q> QS