Using math instructions

# Using math instructions - MFET 243, Automated Manufacturing...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: MFET 243, Automated Manufacturing I PLC Math Examples 1 MFET 243 MFET 243 Using Math Instructions Fall 2009 Fall 2009 1 Example 1 Using Standard Math Instructions F = 9/5 * C + 32 = 1.8 * C + 32 Temperature in C Temperature in F C F 22.0 71.6 30.0 86.0 36.0 96.8 46.0 114.8 56.0 132.8 77.0 170.6 88.0 190.4 100.0 212.0 121.0 249.8 150.0 302.0 MFET 243, Automated Manufacturing I PLC Math Examples 2 Example 2 Using a CPT (Compute) Instruction F = 9/5 * C + 32 = 1.8 * C + 32 Temperature in C Temperature in F C F 22.0 71.6 30.0 86.0 36.0 96.8 46.0 114.8 56.0 132.8 77.0 170.6 88.0 190.4 100.0 212.0 121.0 249.8 150.0 302.0 Example 3 Working with an Array Instead of converting just one number, suppose you had 10 temperatures that needed to be converted from C to F. The temperatures are stored in arrays as shown below C F 22.0 71.6 30.0 86.0 36.0 96.8 46.0 114.8 56.0 132.8 77.0 170.6 88.0 190.4 100 0 212 0 10 Temperatures in C 100.0 212.0 121.0 249.8 150.0 302.0 Equivalent Temperatures in F MFET 243, Automated Manufacturing I...
View Full Document

## This note was uploaded on 02/29/2012 for the course MFET 243 taught by Professor T.e.kostek during the Fall '09 term at Purdue University-West Lafayette.

### Page1 / 6

Using math instructions - MFET 243, Automated Manufacturing...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online