November 23, 2024, 12:18:36 PM

News:

Be sure to checkout our Vixen interfaces in the Library forum -- if you want PC automation at near zero cost, EFX-TEK and Vixen is a great combination of tools.


Solenoid and pilot valve test fixture

Started by gadget-evilusions, June 05, 2009, 09:14:10 AM

Previous topic - Next topic

gadget-evilusions

At my day job I build pop and beer bottling machinery. I am in charge of one line of our machinery that uses around 350 solenoid valves and 312 air pilot valves to control the functions of the filling. I had to build a test stand yesterday to double check the functionallity of some of the valves in house to determine rates of failure. I built it using a prop-1, 2 square D pressure switches with normally open relays, and my valves and test stand.



http://www.youtube.com/watch?v=FhCVejaCwno



' =========================================================================
'
'   File...... Valve_Test.BS1
'   Purpose...
'   Author.... Jon Williams, EFX-TEK
'              Copyright (c) 2009 EFX-TEK
'              Some Rights Reserved
'              -- see http://creativecommons.org/licenses/by/3.0/
'   E-mail.... jwilliams@efx-tek.com
'   Started...
'   Updated... 04 JUN 2009
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------


' -----[ Revision History ]------------------------------------------------
' 6-4-09 BSW added valve2 AND valve operation code

' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL  Check1          = PIN7                  ' SETUP = DN
SYMBOL  Check2          = PIN6                  ' SETUP = DN

SYMBOL  Valve           = PIN0
SYMBOL  Valve2          = PIN1

' -----[ Constants ]-------------------------------------------------------

SYMBOL  IsOn            = 1                     ' for active-high in/out
SYMBOL  IsOff           = 0

SYMBOL  Yes             = 1
SYMBOL  No              = 0


' -----[ Variables ]-------------------------------------------------------

SYMBOL  cycles          = W0                    ' test cycles
SYMBOL  acc1            = W1                    ' P7 counts
SYMBOL  acc2            = W2                    ' P6 counts
SYMBOL  acc3            = W3                    ' P7 counts off
SYMBOL  acc4            = W4                    ' P6 counts off

' -----[ Initialization ]--------------------------------------------------

Reset:
  PINS = %00000000                              ' clear all
  DIRS = %00000011                              ' set output pins

  GOSUB Report


' -----[ Program Code ]----------------------------------------------------

Main:
  FOR cycles = 1 TO 10000
    Valve = IsOn
    PAUSE 2000
    acc1 = acc1 + Check1
    acc2 = acc2 + Check2
    PAUSE 1000
    Valve = IsOff
    GOSUB Report
    Valve2 = IsOn
    PAUSE 1000
    Valve2 = IsOff
    acc3 = acc3 + Check1
    acc4 = acc4 + Check2
  NEXT

  DEBUG CR, "Test complete."

The_End:                                        ' prevent sleep mode
  GOTO The_End


' -----[ Subroutines ]-----------------------------------------------------

Report:
  DEBUG CLS, "Valve Tester", CR, CR
  DEBUG      "Cycles..............................", #cycles, CR
  DEBUG      "Solenoid Valve Opened (P7)..........", #acc1, CR
  DEBUG      "Pilot Valve Opened (P6).............", #acc2, CR
  DEBUG      "Solenoid Valve Stayed Opened (P7)...", #acc3, CR
  DEBUG      "Pilot Valve StayedOpened (P6).......", #acc4, CR
  RETURN

' -------------------------------------------------------------------------


' -----[ User Data ]-------------------------------------------------------


Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

EricTheMannn

Great work!

you have a really cool job haha

-Eric
WooHoo

EricTheMannn

WooHoo