﻿1
00:00:00,630 --> 00:00:06,130
Hello all this is Section 7 of PLCC programming from scratch.

2
00:00:06,630 --> 00:00:12,870
And now we're going to start getting into our actual process logic which is really the heart and soul

3
00:00:12,870 --> 00:00:14,760
of a C program.

4
00:00:14,760 --> 00:00:21,250
Before we get started throwing logical blocks all over ladders we need to stop.

5
00:00:21,360 --> 00:00:29,280
And this is the part we really think about what we're about to program and visualize the process.

6
00:00:29,280 --> 00:00:31,860
What does this machine look like.

7
00:00:31,890 --> 00:00:33,370
How does it work.

8
00:00:33,390 --> 00:00:35,190
How is it laid out.

9
00:00:35,250 --> 00:00:41,440
Where did the process engineer have in mind when he created the piano idea that we're looking at.

10
00:00:41,490 --> 00:00:49,620
And if you don't know what a piano ideas it's piping an instrument diagram which is a typical engineering

11
00:00:49,680 --> 00:00:52,800
output for any type of pipe system.

12
00:00:52,800 --> 00:00:58,680
So before we start programming how do we imagine the process.

13
00:00:58,680 --> 00:01:08,370
How do we understand the process and visualizing the process with something like a visual flow diagram

14
00:01:08,700 --> 00:01:19,470
a cause and effect chart or even a Vizio diagram is a really helpful tool in knowing what your program

15
00:01:19,470 --> 00:01:25,160
is going to need to look like how to divide it up between various ladders.

16
00:01:25,290 --> 00:01:31,490
And really the more you can envision the process from the beginning the easier your program will be

17
00:01:31,490 --> 00:01:32,400
to right.

18
00:01:32,410 --> 00:01:40,440
There's a saying that writing clarifies thought and it's true when we look at the document on the screen

19
00:01:40,440 --> 00:01:40,640
.

20
00:01:40,830 --> 00:01:42,530
It's nothing elaborate.

21
00:01:42,570 --> 00:01:44,910
It's nothing too highly structured.

22
00:01:44,910 --> 00:01:54,330
It's a simple Excel spreadsheet but it tells us in time exactly what needs to happen and when when we're

23
00:01:54,330 --> 00:02:00,870
starting up a system and it's hugely important to have something like this in front of you when you're

24
00:02:00,870 --> 00:02:02,860
writing a C program.

25
00:02:02,880 --> 00:02:09,420
A lot of us can do it off the top of our head and we get a little cocky about doing that.

26
00:02:09,420 --> 00:02:16,950
And more times than not we spend far more time than we should shaking down and debugging a program before

27
00:02:16,950 --> 00:02:20,460
we can load it onto a machine and hand it off to somebody.

28
00:02:20,700 --> 00:02:26,730
And another thing we need to consider when we're putting process logic into a program is what are the

29
00:02:26,730 --> 00:02:35,340
contingencies what can go wrong if we're in the middle of a start up and all of a sudden an alarm condition

30
00:02:35,340 --> 00:02:42,180
arises do we interrupt the start up do we sound the alarm and keep going.

31
00:02:42,330 --> 00:02:48,420
What needs to happen what can happen all the way through our process.

32
00:02:48,420 --> 00:02:53,480
Murphy's Law says anything that can happen will happen.

33
00:02:53,610 --> 00:02:57,990
And in the world of process and automation that's very true.

34
00:02:58,260 --> 00:03:05,260
If it's possible for somebody to throw a shoe into your water tank it will happen.

35
00:03:05,460 --> 00:03:13,240
And when that shoe blocks your discharge valve What is your PEOC going to do about it.

36
00:03:13,260 --> 00:03:19,690
You have to think about not only how is the machine designed.

37
00:03:19,920 --> 00:03:26,940
How is the machine supposed to run but what things can happen along the way and how are we going to

38
00:03:26,940 --> 00:03:32,480
handle those exceptions for the type of programs we're riding in this course.

39
00:03:32,520 --> 00:03:34,170
Very simple.

40
00:03:34,350 --> 00:03:44,130
One or two elements systems of visual flow diagram probably is necessary but in a real world scenario

41
00:03:44,250 --> 00:03:51,570
when you're called to use APL c you're more than likely going to be controlling 10 to 20 or more different

42
00:03:51,570 --> 00:03:52,620
devices.

43
00:03:52,950 --> 00:04:00,720
And on top of that receiving inputs from just as many there aren't many people who can keep that many

44
00:04:00,720 --> 00:04:03,650
different variables straight in their head.

45
00:04:03,660 --> 00:04:13,010
So if you can get as many diagrams as many flowcharts as many theories of operation written out and

46
00:04:13,020 --> 00:04:20,430
on your desk in the beginning it's going to make your job programming a lot faster a lot easier and

47
00:04:20,430 --> 00:04:21,990
certainly a lot cleaner.


