Sensor inputs at two times

da2g

Member
Join Date
Nov 2014
Location
Pennsylvania
Posts
4
I am a very inexperienced, self taught, plc programmer. I have taken Phil’s course, and have programmed a handful of Automation Direct DL05 plc’s to automate some of our factory processes. My programming to date has been very simple (two state switches/sensors for inputs, relay outputs to control solenoid operated valves). Beyond this, I will need help and further study.

For my latest project, I would like to automate an assembly and test station. This will require drawing a vacuum in a test piece, sampling the vacuum inititially, then again at a later time (say 5 seconds), comparing the difference and determining whether this value exceeds a maximum allowable limit. Based on the result, the part would either be rejected, or subject to additional processing.

I will also need a time delay between actuation of a valve that connects the test piece to a vacuum source, and the first vacuum sample, to allow the cavity to be evacuated fully, and to close the vacuum source valve.

I anticipate that I will use a 4-20 mA vacuum sensor (4 mA at atmospheric pressure, 20 mA at –14.7 psi. We can tolerate a maximum loss of .24 psi of vacuum in 5 seconds (0.048 psi/second).

My experience with DirectSoft Box instructions is minimal. I would appreciate any direction to get me started, such as how to implement the time delay for the first and second samples, how to write to memory for the two different samples from the sensor, and what memory locations to use.

Many thanks in advance.
 
Bernie should be able to help you with the analog instructions in Automaion Direct. Send a Private Message to member Bernie_Carlton, if he doesn't respond here.

I think you may have to upgrade to a higher level from the DL-05 in order to get analog inputs. Perhaps a DL-06 would work if you only need 1 analog input, or an AD Click.
 
Last edited:
Fromm the description I don't think PID will be involved. The sequence seems to be:

Apply vacuum - wait some amount of time

Record vacuum reading - wait some more time

Record second reading and compare to the first.

If less by a certain amount then reject else do other processing.

You may need an imput to start the entire process. Read up on timeers in the DL05 manual. Read the analog input card information.

When you have specific information concerning the analog card then good examples are usually given in the manual.

Will this PLC control the 'reject' or 'further processing'?
Will you use a display/HMI for the operator?
 
Last edited:
Thank you Bernie. Part load and unload will be manual. I plan to have a 'cycle start' momentary. 'Reject' will merely cause a reject light to illuminate to notify the operator. Once the cycle is complete, another light will illuminate. I do not envision a display at the present time.
For the analog input, assuming I go with a F0-04AD-1, if I only wish to use one channel, should the SP0 command therefore be 'LD K100'? If so, is there a different Octal value loaded into V7700 for only one channel data storage (i.e. other than LDA O2000)? Also, as I will have two pieces of data separated by time, where do I store the first reading before it gets overwritten? Thanks again.
 
If so, is there a different Octal value loaded into V7700 for only one channel data storage (i.e. other than LDA O2000)?

The 'O2000' is perfectly fine even for one channel. Maybe don't use V2001-V2003 just in case you want to use more channels later.


Here is a very rough first try. Use it if you want.

PLC 05
// Rung 1
// Address 0
#BEGIN COMMENT
"Set up for one channel (K100) and store data starting at V2000"
#END
STR SP0
LD K100
OUT V7700
LDA O2000
OUT V7701
// Rung 2
// Address 5
#BEGIN COMMENT
"Begin the cycle by turning on the vacuum. Reset cycle flags."
#END
STRPD X0
SET Y0
RST C0 C17
// Rung 3
// Address 9
#BEGIN COMMENT
"Begin a delay after turning on the vacuum. Use a V register for the time (tenths of "
"seconds) so the time is changable while setting this up. If you want to lock this in then "
"change the second argument to a 'Kxxx' value."
#END
STR Y0
TMR T0 V2100
// Rung 4
// Address 12
#BEGIN COMMENT
"When the first time period ends store the first reading. (You may want to add a test for a "
"minimum reading in case the vacuum system fails.)"
#END
STRPD T0
LD V2000
OUT V2200
SET C0
// Rung 5
// Address 16
#BEGIN COMMENT
"Begin the delay until the second reading."
#END
STR C0
TMR T1 V2101
// Rung 6
// Address 19
#BEGIN COMMENT
"Store the second reading."
#END
STR T1
LD V2000
OUT V2201
SET C1
// Rung 7
// Address 23
STRPD C0
ANDN V2200 V2300
SET C10
// Rung 8
// Address 27
STRPD C1
LD V2200
SUB V2301
OUT V2302
ANDN V2201 V2302
SET C11
// Rung 9
// Address 34
STR C10
OUT Y1
// Rung 10
// Address 36
STR C11
OUT Y2
// Rung 11
// Address 38
END
// Rung 12
// Address 39
NOP

#BEGIN ELEMENT_DOC
"X0","Cycle Start","",""
"Y0","Vacuum On","",""
"Y1","Vac Sys Prob Lit","",""
"Y2","Vac Leak Prob Lt","",""
"C0","First Read Done","",""
"C1","Second Read Done","",""
"C10","Vac System Prob","",""
"C11","Vacuum Leak","",""
"T0","Delay after Vac","",""
"T1","Delay 2nd Read","",""
"V2000","Vacuum Reading","",""
"V2100","Delay Time 1","",""
"V2101","Delay Time 2","",""
"V2200","Reading 1","",""
"V2201","Reading 2","",""
"V2300","Min Vac Reading","",""
"V2301","Max Drop Allowed","",""
"V2302","Max Drop Cutoff","",""
"V7700","Slot 0 mod setup","",""
"V7701","Slot 0 data ptr","",""
#END
 
In case you aren't sure how to use the listing select and copy everything from 'PLC 05' through '#END' and place into a .txt file.

Then open a new empty Directsoft DL05 project and choose 'File' - 'Import' - 'Program'. select your .txt file.

Oh - and you can reset (RST) the vacuum system (Y0) when the second reading has been taken. Sorry.
 
Last edited:

Similar Topics

Hello, i am a beginner with a Siemens Logo 8 PLC. I would determine the direction of an object if it passes a whole cycle of 2 input sensors. See...
Replies
2
Views
190
Just a quick newbie question. Can I connect directly a digital sensor (reflective diffuse) to two independent PLC´s just by splitting up the...
Replies
5
Views
2,136
The drawing shows the basics of what i am trying to achieve. The Hall sensor is drawn accurately from a schematic from the supplier. It is...
Replies
0
Views
1,207
is there such thing as discrete logic gates for sensor inputs? I ran out of inputs for my plc rack I want to run a pair of sensor to a AND...
Replies
2
Views
2,456
Hi, I've inherited an old machine that makes widgets. it runs well at 300Widgets per min, but any higher it gets flakey. This is a scan time...
Replies
31
Views
10,135
Back
Top Bottom