| The Value property controls the level shown on the display. When the Value property is written to, it will take 8-bits from the 16-bit value stored in the Pattern property. If a 0 is written, then the first bit taken will be bit-0 and the last bit will be bit-7. If a 1 is written, then the first bit taken will be bit 1 and so on. If a value of more than 7 is written, the the 8 bits will wrap the 16 bits. Because the Value property can be read or written, it can be used in mathematical operations. For example, to increase the value displayed, the following code can be used (where D is the name of the o8Bar object.) :
D.Value = D.Value + 1
D.value++;
The Segments property contains the actual binary data that specifies which of the LEDs are on and off. As true with any binary data, bit 0 has a value of 1 while bit 7 has a value of 127. As noted above, when the Value property is written to, the segments the Segments property is set to the bit pattern retrieved from the Pattern property. The binary data contained within the Segments property can also be controlled on a bit by bit basis. Within the Segments property, each bit is assigned a name that specifies which segment that it controls. For example, the following code will turn on the "G" segment:
D.Segment.G = 64
The IOGroup property specifies which group of 8 I/O lines is used to output the data to the segments. The I/O groups are 8 contiguous I/O Lines beginning at I/O line 8, 16, or 24. In each group, the first I/O line is considered bit 0 and the last is considered bit 7. The DIO property is an instance of the oDIO8B object which is created when the o8Bar object is. The o8Bar object configures the oDIO8B object in such a way that it will control the 8 Segment Bar Display. Attributes of the display's operation can be adjusted by directly manipulating the oDIO8B object. Note that doing so may change the way the output behaves to something different than the way described in this document. (see oDIO8B object for more detail) |