The oCdS Object reads the output signal from a circuit containing a CdS cell and calculates a number that indicates the amount of light that the CdS cell is exposed to. It is expecting that the CdS cell circuit is attached to the I/O line specified by the IOLine property. The Level property is updated with the level of light returned by the CdS cell circuit. As long as the Operate property is 1, the oCdS Object will continually update its Level property with the reading. The Adjust property was added in firmware version B.2.0 to allow the input value from the CdS cell circuit to be adjusted. Each CdS cell returns slightly different readings. Therefore, when connecting a new CdS cell, the Adjust property needs to be set so that when it is total darkness, the oCdS Object returns a steady reading of 0. The Adjust property can also be used as a level indicator. When used this way, when a certain brightness or more of light is reached, the level will read a positive value. When it is darker the level will be a negative number. When created, the oCdS Object also creates an instance of the oA2DX object which it uses to read the output signal from the sensor. The instance of the oA2DX is configured to use a 5 volt reference and modifying that or any other properties of the oA2DX instance will affect the oCdS Object's operation in ways that could make the oCdS Object unable to read the sensor. See the oA2DX Help for more detail on how analog signals (such as the signal form the CdS cell circuit) are read. |