PLC sample test

E

Thread Starter

Erik

I'm looking for a short sweet sample test to give to prospective maintenance techs in regards to PLC trouble shooting ability. Would be wonderful if the answers were included. If it matters we are a die cast facility.
 
B

Bob Peterson

A fairly basic test.


INSTRUCTIONS: This test has a time limit of 60 minutes. Answer as many questions as you can in the allotted time. Do not guess. Incorrect answers are penalized at the same value as correct answers are credited. Calculators may be used (but probably won’t help you any).

1. Numbering systems. Fill in the chart with the appropriate binary, hexadecimal, and decimal number equivalents (20 points).

Function

Binary

Hexadecimal

Decimal

2^0

2^1

2^3

2^7

2^11

2^15

2^16

(^ is the power operator (i.e. – 2^3 = 2*2*2=8))

2. Two’s complement numbers.

[deleted as the email would not allow images]


3. BCD numbers. The following routine is discovered in a BASIC program.

B = 0
A = 1560
B = (A/1000) * 01000H
A = A % 1000
B = B + ((A/100) * 0100H)
A = A % 100
B = B + ((A/10) * 010H)
A = A % 10
B = B + A

B and A are 16 bit integers. The “%” operator is the modulus (remainder) function (i.e. – 14 % 3 = 2). The division operator (“/”) does not round (i.e. – 14 / 3 = 4). Constants such as 01000H represent hexadecimal numbers.

What does B equal after this routine is completed? Decimal_______ Hexadecimal _______ (1 point each)

What is the purpose of this routine? (10 points)

4. Communications interfaces:

Circle the correct answer(s) (1 point each correct answer)

A. The voltage level of RS-232 signals is:

a) +/- 12 vdc
b) 5 vdc
c) 24 vdc

B. The voltage level of RS-485 signals is:

a) +/- 12 vdc
b) 5 vdc
c) 24 vdc

C. The term baud rate and bps (bits per second) are sometimes used
interchangeably. Is this technically correct?

a) Yes
b) No

D. The RS-232 standard specifies which of the following items.

a) Voltage level
b) Signal pin out (i.e. – pin 2 is transmit and pin 3 is receive)
c) Certain physical specifications of the cabling (such as maximum capacitance per foot)
d) Maximum cable length

E. An ASCII character uses

a) 7 bits
b) 8 bits

F. Commonly available asynchronous modems (Hayes compatible) allow a maximum frame size of

a) 10 bits
b) 11 bits
c) 12 bits

G. If using 9600 baud, 8 data bits, no parity, 1 stop and 1 start bit, the approximate time to transmit 1 character is closest to:

a) 1 millisecond
b) 1 microsecond
c) 1 second

H. The maximum allowed speed for RS-232 (according to the EIA RS-232 spec) is:

a) 19,200 bps
b) 9600 baud

I. Ethernet uses which of the following cables?

a) Coax
b) Unshielded, twisted pairs
c) Shielded, untwisted pairs
d) Impedance balanced cables

5. Algorithms. Use an algebraic expression, ladder logic, pseudo-code or any BASIC-like language to complete the following exercises (10 points each). The purpose of the exercise is to determine if the candidate can create the required algorithm, not whether it is syntactically correct for a specific language.

A. Describe an algorithm to square the value in each entry of a table of values, subtract 14 from this value, and place the result in another table. Call the source table A[x], and the result table B[x] (where x ranges from 1 to 39).

B. Modicon PLCs do not have a floating point ladder logic power function (e.g.: 2.5^3.6), but do have exponential (e.g.: e^3.6) and natural logarithm (ln) functions. Create an algorithm to find z by raising a number x to the y power (i.e.: z = x^y) using natural logarithms and the exponential function. HINT: x = e^(ln x).

C. Create an algorithm to determine total flow, y, through a flow meter using the trapezoidal rule. The flow rate is x, in gpm, and the sample time is t, in seconds.

D. A leap year is a year that has 29 days in February. Leap years are evenly divisible by 4 (such as 1976), unless they are also evenly divisible by 100 (such as 1900), except those years also evenly divisible by 400 (such as 2000). Write an expression to determine if a year is a leap year or not.

E. An RS-232 communications link uses a packet oriented protocol. As part of that protocol, a check sum has to be calculated and added to the end of the packet. The packets look like this:

Byte 0: always 01H
Byte 1: type of packet
Bytes 2-30: information
Byte 31: checksum

The checksum is calculated as the 8 bit modulus 256 sum (i.e. – add up the bytes and mask off all but the low 8 bits) of bytes 1-30. Create an algorithm to calculate the checksum.

--
Bob
http://ilbob.blogspot.com/
 
Top