Read a 4 Digit BCD number, 2 Digits at a time

[GET 4 BCDS]

Returns value of 4 digit BCD number

OT01

Connect ground of first two BCD digits

(4 DIGIT BCD)=(2TW)*100

Make value of first two digits the MSB

OT10

Connect ground of 2nd two BCD digits

(4 DIGIT BCD)=(4 DIGIT BCD)+(2TW)

Add value of 2nd two to 1st two * 100

Reading an Analog Input Value

The value of the analog system variables (Al I –AI6) are scaled from 14,400 to 72,000 Hz. This value is actually a scaled frequency read from the OPTO module representing the analog signal. These input values are updated every 16 milliseconds. If your program needs to display this value in units such as VOLTS, you will need to scale the value to VOLTS in your program. The scaling factor depends upon the type of OPTO module used. For example: a ”J ” thermocouple uses a different factor than a ”K” thermocouple. Due to slight variances in the output frequency from module to module, it is recommended that the OPTO be calibrated by querying the corresponding AIx value with no input signal connected to the OPTO. This value should be used as the zero input reference frequency.

Example: Use a 0–10VDC analog input. 0V=14,400; 10V=72,000 or 5.760 Hz/volt.

(VOLT)=(AI2)

Read the value of analog input #2 into variable volts

(VOLT)=(VOLT)–14400

Remove frequency offset

(VOLT)=(VOLT)*1.736

Scaling factor multiplied. by 10,000

(VOLT=(VOLT)*.0001

Scaling back to volts

The variable (VOLT) is now in units of volts. If you are waiting for a condition to occur or doing a comparison, (see below) there is no need to go through the conversion process.

(TEMP)=(AI9)

Read in temperature from analog input

WT(AI12)<45000 GO

Wait for analog input 12 <45000 (<5.3 VDC using the

 

previous example) before moving

IF(AI12)<45000 GO EB

Go if analog input 12 < 45000

80

70

Output 60

Frequency 50 (kHz)

40

30

20

14.4

10

72

Min

Max

Value

Value

 

Input Signal

6-32 Keypad Programming

MN1853

Page 91
Image 91
Baldor MIN1853 manual Read a 4 Digit BCD number, 2 Digits at a time, Reading an Analog Input Value, GET 4 Bcds