November 21, 2024, 12:16:19 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


2010 Hellevator Simulator

Started by Ryanm0085, July 25, 2010, 12:36:37 PM

Previous topic - Next topic

Ryanm0085

That would be awesome...right now im very busy with work.  I've been thinking about the program and have an idea but just haven't had the time.  All relays are connected to the OUTs on the Prop 2.  And yes when i say HIGH, i mean turn the relay on. Ive used NC contacts on certail things to incorporate it with my E-Stop Circuit.  I used a latch circuit that supplies 12v to the prop-2 and the DC-16.  I used NC contacts on the doors, lights and down solenoid so when the e-stop is pressed, it will kill the 12v to the boards and close those three relays opening the door, turning the lights on, and bringing the elevator down.  Hopefully this will help.

bsnut

Your program is basically finished, without the MP3 code. I need some more info from you so I can finished your program. I need more detail on this statement "P9, P3, & P2 on the DC16 HIGH" in your last post. What are you wanting to do here? Once you provide the info I need, I can post it for you. Remember that the 7 segment display that is connected on the DC16 needs the first or last 8 bits (outs 1 to 8 or 9 to 16). I need to know what the rest are being use for on the DC16 as well.

I am starting to feel like Jon right now ;D.

William "bsnut"   
William Stefan
The Basic Stamp Nut

JonnyMac

Welcome to my world.  Programming can be tough with all the information -- it's darned near impossible with information is missing or withheld....
Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

I said to use P9 P3 ans P2 just to show how to get the code to the DC-16.  P0- P6 on the DC-16 are used for the seven segment display.   Then P7 and P8 are used for Up and Down arrows inside the elevator, different from the up arrow connected to the Prop-2.  I really appreciate all your help as well as Jonny's and everyone elses. 

bsnut

Have no problem writing programs for anyone. You tell me how you want the program to work and can write you one.

The only thing I have hardware wise is Prop1 and a RC4 that was bought back when Parallax was selling them before Jon and John their is company. I didn't get time to make it down to the MWH Convention to get a Prop2 and a DC16.

This is what, I will do for you with the DC16, is make the first 8 outputs the 7 segment display and 2 outputs out of last 8 outputs the up and down arrows(out9 up and out10 down).

Here's 2 questions.
1: What is the max number for the 7 segment display?
2: I know it needs to count up, but do you need it count down as well?

I should have this program ready to post Friday morning the latest.
William Stefan
The Basic Stamp Nut

Ryanm0085

Okay actually i was wrong on the 7-segment display.  P0-P6 are connected to the 7-Segment dispaly.  Then i have a "1" that is connected to P7.  Having the arrows on P8 and P9 is fine.  The segment will count up from 1 to 14.  This is not a huge deal right now.  All i was looking for was how to get the serial commands out to the DC-16.  If you would like to go beyond that, that is fine.  Really it will be all in the timing once i start running it and timing it with the music.  The script i wrote was really just a basic idea of what it will do.  It contains all the commands i need, but most likely will be more advanced when i am finished.  More than likely i will have the elevator move up and down more than once, but for now and for testing, what i have written is fine.  I will be able to make all adjustments once the basic program is done. 

JonnyMac

Wait a minute... we have demo software that shows EXACTLY how to send commands to the DC-16.  Since you're NOT giving specifics as to what you want to be commanded on the other side, NOBODY can give you any more than that.

Ryan, the reason that this project has been so drawn out is that you continue to withhold information.  If you haven't decided yet, that's fine, but it's really hard for those of us who really want to help you to have to keep asking the same questions.

Once you got your test working I specifically asked you to start to describe the code one section at a time so that we could build it and you could lean the details for fine tuning later.  Instead, you post your whole thing, but without all the required information -- again.  

In the words of Jerry Maguire, "Help me help you."  Please, when I ask for something specific I need it.  If you don't give me what I need to help you then I can't.
Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

I don't understand what information I am leaving out.  I have given you all the connections and step by step details of the program.  there are some things i can't tell you without running the program and seeing where everything falls into place.  Everything would just be a guess.  For example, I don't know exactly how long it will take the elevator to reach max height and reach lowest height.  i don't know how long it will take for the door to open and close.  For the DC-16, it was mainly just to see how the program is set up to recognize it and get the signals out.  Then once the programs running i can fit the SiO Commands inbetween critical steps.  Like i said, the 7-segment is not critical.  If i can make it work fine.  but i don't want to base the program off of it.  If i have a space between the up and down, i will put some commands in there.  But i won't know anything until i watch the program run.  As far as information missing, i have read through my post 3 or 4 times and feel all the information is there.  However, I am not a programmer.  You keep telling me information is missing.  Please specify.  I believe in my post it says the DC-16 is not critical right now.  If you can make it show "1", the i feel capable enought that i can make it count up and down. 

Ryanm0085

Heres the detail for the DC-16.  The 7-Segment LED is home made with a bunch of LED's soldiered on a board.  The bottom LED is P0 the bottom-right is P1, the top-right is P2, the top is P3, the top-left is P4, the bottom-left is P5, the middle is P6.  On the second one i tied both bottom-right and top-right together to make a "1".  this is on P7.  There is an LED "UP" arrow on P8 and a "Down" arrow on P9.  That is all that is connected to the DC-16.  The Floor will start out at "1" and end at "13". Other than this i dunno what else i am missing...

bsnut

The program that I wrote for you is based on the info you provided. As programmer I read and read the documents provided me over and over many times. The ones that as done for the DC16, RC4, Prop1&2 and info provided persons who post on this site. Jon and myself like to write programs, but details are very important, such what is connected to what pins and what is input and what is an output.   
William Stefan
The Basic Stamp Nut

Ryanm0085

August 10, 2010, 06:02:16 PM #25 Last Edit: August 10, 2010, 06:04:50 PM by Ryanm0085
Are you asking for more information or do u understand everything?  My lists explain what is connected to each PIN and what r Outputs and Inputs.  That is why I am getting confused on missing information...

JonnyMac

The problem for me is that you don't fully know what you want -- you've stated that -- but you want a complete program.  That's very difficult.  Make a guess as to what's going to happen and describe behavior.  If you're just going to give connections I will keep pointing you back to all of our product test programs that show basic communications to that module
Jon McPhalen
EFX-TEK Hollywood Office

Ryanm0085

I will give u every detail i know.....The elevator is a 8' x 8' x 8' box that is attaced to steel frame that rides up and down on airbags.  The airbags are controlled by 2 solenoid valves, one allows air into the bags(UP) lifting the elevator, and the other one allows the air out(DOWN), dropping the elevator.  The up valve is Normally Closed and must have a 12v signal to allow air into the bag.  The Up Solenoid is connected to P6 on the Prop-2.  The down Solenoid is on Normally Open and remains open until 12v is sent to close the Valve.  The Down Solenoid is connected to P7 on the Prop-2.  In order for the elevator to rise up, the Down solenoid must be close.  So for the elevator to go up, both P6 and P7 would need to be turned on.  For down, both would have to be turned off.  The air is supplied by a compressor and piped to the solenoids.  The interior lighting consists of standard flourescent lights and blacklights.  Power to the lights is supplied from a 110v Normally Closed Relay with a 12v coil which is connected to P3.  To turn this relay off and shut the power to the interior lights off, P3 would have to be turned on.  The flourescent lights and blacklights are then connected to another relay to change between one or the other.  The flourescent lights are on the NC contacts of a relay, and the Blacklights on the NO contacts of the same relay, which is connected to P4.  In this case, in order to get the blacklights to turn on, P3 would remain off to allow power, and P4 would be on to direct power to the black light side (NO Contacts).  The elevator door is a windshield wiper motor connected to a circuit of relays that will control it.  The main relay control is connected to P10.  The circuit contains limit switches and relays that will open and close the door with and off and on signal.  When P10 is On, the door will close and remain Closed.  When P10 is off, the Door will open and remain opened.  I have another light toggle that will change from highhats to strobe lights outside of the elevator.  These are connected to P5.  They have there own power source seperate from the interior lights.  The highhats are NC and the strobes are NO.  When P5 is off, the highhats will light.  When P5 is On the Strobes will light.  P8 is connected to a 12v relief valve that will need to be opened after every run.   When P8 is on the valve will open.  I have a 12v Up Arrow connected to P9.  It will light when P9 is On.  All these so far are on the Prop-2.  On the DC-16 I have a seven-segment display connected.  P0 is the bottom line, P1 is the bottom-right line, P2 is the top-right line, P3 is the top line, P4 is the top-left line, P5 is the bottom-left line, P6 is the middle line.  P7 is connected to a "1" infront of the seven-segment display to achieve numbers in the teens.  On P8, i have another 12v Up arrow inside the elevator and on P9 a down arrow.  Thats it on the DC-16.  The uMP3 player's TX is connected to P13 and the RX to P14 on the Prop-2.  The two mp3's i will use are one.mp3 and two.mp3.  The DC-16 is connected to P15.  The elevator has 3 inputs.  One on front to "call" the elevator(P0), one is inside the elevator to select the floor(P1), and one to reset the elevator to wait again(P2).

On initialization i would like the down solenoid to close(P7 On), and the power to the lights to turn off(P3 On).  Then i would like the DC-16 to "zip" through all the outputs for one second each.  Next, the power to the lights should restore (P3 Off).  Then after a second, switch to the blacklights (P4 On) for a second, and then back to flourescents (P4 Off).  After this, toggle between the highhats and strobes for one second(P5 on then off).  Now the power to the lights can be cut (P3 On) and the door shut(P10 On).  After a second, the up solenoid should open for a second(P6 On then Off) raising the elevator, and then the down solenoid should open for a second then close(P7 Off and then On)to bleed the air and drop the elevator.  Now the elevator is waiting. Start one.mp3.  It should be in the down position(P6 Off & P7 On) with the interior lights off(P3 On), the 7-seg display cleared, the highhats on(P5 Off), and the door closed (P10 On) with one.mp3 playing.  It should be waiting for Input on P0.

Once the Input on P0 is detected the elevator will act as it is arriving on the 1st floor.  Once input is detected, wait 2 seconds. Then the interior lights will power on (P3 Off) and the flourescents will be on(P4 Off).  The 7-segment should be lit up to "1" (P1 & P2 On).  After a second The UP Arrow on the Prop-2 should light(P9 On)as well as the up arrow on the DC-16(P8 On).  Then after another second, the door should open (P10 Off).  Now it should wait for Input 2.

Once Input 2 (P1) is detected, the elevator will start its descent up.  Immidiately, two.mp3 should start playing.  after 2 seconds, the door should close (P10 ON) and the up arrows off(P9 off on the Prop-2 and P8 off on the DC-16).  after 1 second open the up solenoid for 2 seconds to lift elevator (P6 On then Off).  I would now like the 7-seg display to count up to 13, with 1 second between each number.  Once it reaches 13, the elevator should drop (P7 Off).  then after 1 second, kill the power to the interior lights (P3 On).  switch from flourescents to black lights (P4 On) then after 2 seconds, return power (P3 Off). Clear DC-16 Outputs.  After 3 seconds, switch from highhats to strobes (P5 On).  Then after 2 seconds, open the door (P10 Off).  Wait for Input 3 (P2)

Once this input is detected, i would like the elevator to return back to the "waiting mode"  I would like this input to be able to be detected either after input 1 or input 3.  this way, even after just running input 1, i can still have it reset.  Once detected, the strobes should return to the highhats (P5 Off), the blacklights back to flourescents (P4 off), the light power cut, (P3 On), the down solenoid closed (P7 On) and the door closed(P10 On).  Then start One.mp3.  Wait for input 1 (P0)

Hopefully this will help....

bsnut

I will have your program ready Friday morning based on the last post you made. I need to make some minor changes to your program, I will post it without sound for now so you can start your tests on your I/O.
William Stefan
The Basic Stamp Nut

Ryanm0085

alright sounds great...i hope my last post was able to clear things up.  i gave every detail i possibly could...