The text of a manual ยท part 5 of 14
Optimation OptiLogic Driver Help, pages 29 to 38
Pages 29 to 38 of 119
The original document is the PDF (1.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Optimation OL4054 and Optimation OL4058
Page 29
Optimation OptiLogic Driver Help
29 Syntax
Data Type
Range
Access
S<slot>:AO<channel>.RANGE
Word, Short, DWord, Long
1-4
Write Only
Examples Address
Value
Description
S1:AO2.RANGE
2
Slot 1, channel 2, set voltage range to +/- 5V.
S1:AO4.RANGE
0
Slot 1, channel 4, set voltage range to 0-5V.
8 Channel Analog Output Module
Each channel of an analog input module uses a 12 bit D/A converter to produce an analog output signal.
Subtypes N/A
8 Channel Analog Output Addressing Specifications Syntax
Data Type
Range
Access
S<slot>:AO<channel>
Word, Short, DWord, Long
1-8
Write Only
Examples Address
Value
Description
S1:AO2
1024 *
Slot 1, channel 2.
S1:AO8
0*
Slot 1, channel 8.
*The exact analog output value depends on voltage range, accuracy and so forth.
16 Channel Analog Output Module
Each channel of an analog input module uses a 12-bit D/A converter to produce an analog output signal.
Subtypes N/A
16 Channel Analog Output Addressing Specifications www. kepware.com
Page 30
Optimation OptiLogic Driver Help
30
Syntax
Data Type
Range
Access
S<slot>:AO<channel>
Word, Short, DWord, Long
1-16
Write Only
Examples Address
Value
Description
S1:AO2
1024 *
Slot 1, channel 2.
S1:AO16
0*
Slot 1, channel 16.
*The exact analog output value depends on voltage range, accuracy and so forth.
High Speed Counter Module The OL2258 High Speed Pulse Counter module provides for direct pulse counting for a variety of high-speed pulse interface applications. Typical applications include motion control, metering and velocity measurement. The OL2258 can be configured to operate in one of three modes: 1. Pulse & Direction (up to 80 kHz input). 2. Up/Down Count (up to 80 kHz input). 3. Quadrature (up to 160 kHz input). Besides the counter's current count value, the pulse count in the most recent frequency period (user configurable) is also accessible. The OL2258 also contains 2 digital outputs, triggered on when the pulse count reaches the output's minimum range and triggered off when it reaches the output's maximum range.
Subtypes OL2258
Address Types Channel Pulse Count Channel Frequency Data Channel Status: A Channel Status: B Channel Status: Z Channel Status: LS Channel Configuration: Count Type Channel Configuration: Frequency Period Channel Configuration: Preset Channel Configuration: Force Preset Channel Configuration: Hold Count Channel Configuration: Z Preset Enable Channel Configuration: LS Preset Enable Triggered Digital Outputs Triggered Digital Outputs: Minimum Range Triggered Digital Outputs: Maximum Range Triggered Digital Outputs: Range Enable
Channel Pulse Count The pulse count for each channel can be referenced using address type C<channel>.COUNT.
Requirements None
Specifications Syntax
Data Type
Range
Access
S<slot>:C<channel>.COUNT
DWord, Long
1
Read Only
Examples www. kepware.com
Page 31
Optimation OptiLogic Driver Help
31 Address
Value
Description
S1:C1.COUNT
0
Slot 1, channel 1 pulse count is 0.
S1:C1.COUNT
1000
Slot 1, channel 1 pulse count is 1000.
Channel Frequency Data A pulse count over a preset period of time (C<channel>.COUNT @ (start + period)-C<channel>.COUNT @ start) can be accessed through C<channel>.FREQDATA.
Requirements C<channel>.FREQPER determines the period and should be set before accessing C<channel>.FREQDATA.
Specifications Syntax
Data Type
Range
Access
S<slot>:C<channel>.FREQDATA
Word, Short, DWord, Long
1
Read Only
Examples Address
Value
Description
S1:C1.FREQDATA
60000
Slot 1, ch1, if FREQPER = 1 sec, pulse is 60kHz.
S1:C1.FREQDATA
16000
Slot 1, ch1, if FREQPER = 200ms, pulse is 80kHz.
Channel Status: A Pulse input A can be referenced through CSTS<channel>.A. Count type defines the meaning of this input as follows: Count Type
Input Definition
Pulse & Direction
Pulse Input
Up/Down Count
Up Pulse Input
Quadrature Encoder Input
Pulse Input
Note: For more information, refer to OptiLogic I/O Modules Manual.
Values True = Pulse level high False = Pulse level low
Requirements CCFG<channel>.COUNTTYPE determines the meaning of this input and should be set before accessing CSTS<channel>.A
Specifications Syntax
Data Type
Range
Access
S<slot>:CSTS<channel>.A
Boolean
1
Read Only
Channel Status: B Pulse input B can be referenced through CSTS<channel>.B. Count type defines the meaning of this input as follows: Count Type
Input Definition
Pulse & Direction
Direction Input
Up/Down Count
Down Pulse Input
Quadrature Encoder Input
Pulse Input
Note: For more information, refer to OptiLogic I/O Modules Manual.
Values True = Pulse level high False = Pulse level low
Requirements CCFG<channel>.COUNTTYPE determines the meaning of this input and should be set before accessing CSTS<channel>.B www. kepware.com
Page 32
Optimation OptiLogic Driver Help
32
Specifications Syntax
Data Type
Range
Access
S<slot>:CSTS<channel>.B
Boolean
1
Read Only
Channel Status: Z Optional input Z provides a means of automatically resetting the count value to a user-defined preset value. Reference Z through CSTS<channel>.Z.
Values True = If ZPRESETEN set, send PRESET to device. Otherwise, take no action. False = No action
Requirements CCFG<channel>.ZPRESETEN must be set in order to enable use of Z in presetting counter
Specifications Syntax
Data Type
Range
Access
S<slot>:CSTS<channel>.Z
Boolean
1
Read Only
Channel Status: LS Optional limit switch input LS provides a means of automatically resetting the count value to a user-defined preset value. Reference LS through CSTS<channel>.LS.
Values True = If LSPRESETEN set, send PRESET to device. Otherwise, take no action. False = No action
Requirements CCFG<channel>.LSPRESETEN must be set in order to enable use of LS in presetting counter
Specifications Syntax
Data Type
Range
Access
S<slot>:CSTS<channel>.LS
Boolean
1
Read Only
Channel Configuration: Count Type (Mode) The mode of counter operation is configured via CCFG<channel>.COUNTTYPE.
Values 0 = Pulse & Direction 1 = Up/Down Count 2 = Quadrature
Requirements None
Specifications Syntax
Data Type
Range
Access
S<slot>:CCFG<channel>.COUNTTYPE
Byte, Word, Short, DWord, Long
1
Read/Write
Note: For more information, refer to OptiLogic I/O Modules Manual.
Examples Address
Value
Description
S1:CCFG1.COUNTTYPE
1
Slot 1, ch1 count mode set for pulse & dir.
S1:CCFG1.COUNTTYPE
3
Slot 1, ch1 count mode set for quadrature.
Channel Configuration: Frequency Period Recall that a pulse count over a preset period of time can be accessed through C<channel>.FREQDATA. The period in the FREQDATA formula C<channel>.COUNT @ (start + period)-C<channel>.COUNT @ start is configured through CCFG<channel>.FREQPER.
www. kepware.com
Page 33
Optimation OptiLogic Driver Help
33 Values 0 = 1 second count 1 = 200 msec count
Requirements None
Specifications Syntax
Data Type
Range
Access
S<slot>:CCFG<channel>.FREQPER
Byte, Word, Short, DWord, Long
1
Read/Write
Examples Address
Value
Description
S1:CCFG1.FREQPER
0
Slot 1, ch1, FREQDATA reflects count in 1 second time window.
S1:CCFG1.FREQPER
1
Slot 1, ch1, FREQDATA reflects count in 200 ms time window.
Channel Configuration: Preset Establish a preset count value by setting CCFG<channel>.PRESET.
Requirements For preset to take effect, at least one of the following must be true: CCFG<channel>.FORCEPRESET be set to TRUE CCFG<channel>.ZPRESETEN be set to TRUE and Z input be TRUE CCFG<channel>.LSPRESETEN be set to TRUE and LS input be TRUE
Specifications Syntax
Data Type
Range
Access
S<slot>:CCFG<channel>.PRESET
DWord, Long
1
Write Only
Examples Address
Value
Description
S1:CCFG1.PRESET
1000
Slot 1, ch1, set preset to 1000.
S1:CCFG1.PRESET
0
Slot 1, ch1, set preset to 0 (default).
Channel Configuration: Force Preset Set the counter's count value to the preset given in CCFG<channel>PRESET.
Values True = Send PRESET to device False = No action
Requirements None
Specifications Syntax
Data Type
Range
Access
S<slot>:CCFG<channel>.FORCEPRESET
Boolean
1
Write Only
Channel Configuration: Hold Count Hold the current count value by referencing CCFG<channel>.HOLDCOUNT.
Values True = Hold count value False = No action
Requirements None.
Specifications www. kepware.com
Page 34
Optimation OptiLogic Driver Help
34
Syntax
Data Type
Range
Access
S<slot>:CCFG<channel>.HOLDCOUNT
Boolean
1
Write Only
Syntax
Data Type
Range
Access
S<slot>:CCFG<channel>.ZPRESETEN
Boolean
1
Write Only
Syntax
Data Type
Range
Access
S<slot>:CCFG<channel>.LSPRESETEN
Boolean
1
Write Only
Channel Configuration: Z Preset Enable Enables Z input to control the presetting of the counter.
Values True = Z input state configured to preset counter when applicable False = Z input state has no control over presetting counter
Requirements None.
Specifications
Channel Configuration: LS Preset Enable Enables LS input to control the presetting of the counter.
Values True = LS input state configured to preset counter when applicable False = LS input state has no control over presetting counter
Requirements None.
Specifications
Triggered Digital Outputs There are 2 digital outputs that can be configured to turn on when the counter count is within a specific range. The status of whether the digital output is on or off can be accessed through CTRIGDO<output>.
Requirements CTRIGDO outputs must have a range specified and enabled, otherwise outputs will remain off.
Specifications Syntax
Data Type
Range
Access
S<slot>:CTRIGDO<output>
Boolean
1-2
Read Only
Examples Address
Value
Description
S1:CTRIGDO1
1
Slot 1, output 1 is on.
S1:CTRIGDO2
0
Slot 1, output 2 is off.
Triggered Digital Outputs: Minimum Range Set the range's minimum value to be the counter's count value at which users desire the CTRIGDO<output> to turn from off to on. This minimum range value is referenced as CTRIGDO<output>.MINRANGE.
Requirements CTRIGDO range usage must be enabled.
Specifications Syntax
Data Type
Range
Access
S<slot>:CTRIGDO<output>.MINRANGE
DWord, Long
1-2
Write Only
Examples Address
Value
Description www. kepware.com
Page 35
Optimation OptiLogic Driver Help
35 S1:CTRIGDO1.MINRANGE
100
Slot 1, output 1, turn on when count = 100.
S1:CTRIGDO2.MINRANGE
65536
Slot 1, output 2, turn on when count = 65536.
Triggered Digital Outputs: Maximum Range Set the range's maximum value to be the counter's count value at which users desire the CTRIGDO<output> to turn from on to off. This maximum range value is referenced as CTRIGDO<output>.MAXRANGE.
Requirements CTRIGDO usage range must be enabled.
Specifications Syntax
Data Type
Range
Access
S<slot>:CTRIGDO<output>.MAXRANGE
DWord, Long
1-2
Write Only
Examples Address
Value
Description
S1:CTRIGDO1.MAXRANGE
1000
Slot 1, output 1, turn off when count = 1000.
S1:CTRIGDO2.MAXRANGE
0
Slot 1, output 2, turn off when count = 0 (from rollover).
Triggered Digital Outputs: Range Enable Enable the minimum and maximum range values for CTRIGDO (enable usage of a CTRIGDO output) by referencing CTRIGDO<output>.RANGEEN.
Requirements None.
Specifications Syntax
Data Type
Range
Access
S<slot>:CTRIGDO<output>.RANGEEN
Boolean
1-2
Write Only
Examples Address
Value
Description
S1:CTRIGDO1.RANGEEN
1
Slot 1, output 1 enabled.
S1:CTRIGDO2.RANGEEN
0
Slot 1, output 2 disabled.
2 Channel High Speed Counter Module
The OL2252 Dual High Speed Pulse Counter module has two 0-15 kHz pulse counter inputs. Each input is independent of the other. There are a number of configuration options available. See OL2252 manual for details. Of the 10 inputs, 6 can be configured for general-purpose input and is referred to in this driver as CDI (counter digital input). Both channels have a software reset and an optional hardware reset as well as a software enable and optional hardware enable.
Subtypes OL2252
Address Types Channel Pulse Count Channel Enable (Software) Channel Reset (Software) Channel Enable (Hardware) Channel Reset (Hardware)
www. kepware.com
Page 36
Optimation OptiLogic Driver Help
36
Channel Debounce Count 8 Digital Input
Channel Pulse Count Addressing The pulse count for each channel can be referenced using address type C<channel>.COUNT.
Requirements Channel counter must be enabled either by software or hardware for counter to pulse count.
Specifications Syntax
Data Type
Range
Access
S<slot>:C<channel>.COUNT
DWord, Long
1-2
Read Only
Examples Address
Value
Description
S1:C1.COUNT
0
Slot 1, channel 1 pulse count is 0.*
S1:C2.COUNT
1000
Slot 1, channel 2 pulse count is 1000.*
*See Requirements above.
Channel Enable (Software) Addressing Channels can be enabled/disabled through software by referencing address type C<channel>.EN.
Values True = channel enabled False = channel disabled* *Provided channel is not currently hardware enabled.
Requirements None
Specifications Address
Value
Description
S1:C1.COUNT
0
Slot 1, channel 1 pulse count is 0.*
S1:C2.COUNT
1000
Slot 1, channel 2 pulse count is 1000.*
Examples Address
Value
Description
S1:C1.EN
0
Slot 1, ch1 not software enabled.
S1:C2.EN
1
Slot 1, ch2 software enabled.
Channel Reset (Software) Addressing A channel's pulse count can be reset through software by referencing address type C<channel>.RES.
Values True = channel pulse count reset False = channel pulse counting* *Provided channel is not currently in a hardware reset.
Requirements None
Specifications Syntax
Data Type
Range
Access
S<slot>:C<channel>.RES
Boolean
1-2
Write Only
Examples Address
Value
Description www. kepware.com
Page 37
Optimation OptiLogic Driver Help
37 S1:C1.RES
0
Slot 1, ch1 not software reset.
S1:C2.RES
1
Slot 1, ch2 software reset.
Channel Enable (Hardware) Addressing Channels can be enabled by an external enable signal. Enable/disable this capability by referencing address type CCFG<channel>.HEN.
Values True = allow hardware enable of channel False = don't allow hardware enable of channel
Requirements None
Specifications Syntax
Data Type
Range
Access
S<slot>:CCFG<channel>.HEN
Boolean
1-2
Write Only
Examples Address
Value
Description
S1:CCFG1.HEN
0
Slot 1, ch1 hardware enable not allowed.
S1:CCFG2.HEN
1
Slot 1, ch2 hardware enabled allowed.
Channel Reset (Hardware) Addressing A channel's pulse count can be reset by an external reset signal. Enable/disable this capability by referencing address type CCFG<channel>.HRES.
Values True = allow hardware reset of pulse count False = don't allow hardware reset of pulse count
Requirements None
Specifications Syntax
Data Type
Range
Access
S<slot>:CCFG<channel>.HRES
Boolean
1-2
Write Only
Examples Address
Value
Description
S1:CCFG1.HRES
0
Slot 1, ch1 hardware reset not allowed.
S1:CCFG2.HRES
1
Slot 1, ch2 hardware reset allowed.
Channel Debounce Count Addressing CCFG<channel>.DBNC establishes the maximum pulse frequency that a channel will count.
Values 2 = 15 kHz 4 = 10 kHz 8 = 5 kHz 16 = 2.5 kHz 40 = 1 kHz Note: The default value is 15 kHz.
Requirements None
Specifications Syntax
Data Type
Range
Access
S<slot>:CCFG<channel>.DBNC
Byte, Word, Short, DWord, Long
1-2
Write Only www. kepware.com
Page 38
Optimation OptiLogic Driver Help
38
Examples Address
Value
Description
S1:CCFG1.DBNC
40
Slot 1, ch1 max pulse freq set to 1 kHz.
S1:CCFG2.DBNC
2
Slot 1, ch2 max pulse freq set to 15 kHz.
8 Digital Input Addressing The counter's general-purpose inputs are referenced using address type CDI.
Requirements None
Specifications Syntax
Data Type
Range
Access
S<slot>:CDI<point>
Boolean
0-7
Read Only
S<slot>:CDI<offset>*
Byte, Word, Short, DWord, Long
0
Read Only
*Multiple points can be referenced through the use of this optional syntax. For more information, refer to Digital I/O Bit Mapping.
Examples Address
Value
Description
S1:CDI0
1
Slot 1, point 0 (terminal 10) is on.
S1:CDI0 (as Byte)
0
Slot 1, byte 0 (points 0-7 are all off).
Base RS232 Port
The Ethernet Base contains an RS232 serial port. Both the transmit buffer and receive buffer of the driver are 48 bytes in size. Likewise, the corresponding tags can be a maximum of 48 bytes. Incoming bytes are appended to the receive buffer as long as they are received in proper time. This time period depends on the baud rate and is based on a 20-character delay using a 20 ms resolution. 300 Baud => 660 ms 1200 Baud => 160 ms 2400 Baud => 80 ms 4800 Baud => 40 ms 9600 Baud => 20 ms 19200 Baud => 20 ms For a 4800 baud link, bytes would be appended to the receive buffer as long as they were received within 40 ms of the last byte sent. After 40 ms, any incoming bytes are www. kepware.com