• Forums
• Posts
Latest Posts
Active Posts
Recently Visited
Search Results
• Page Extras
• Forum Themes
• AVR Freaks

### LockedElevator Algo

Page: < 12345 Showing page 5 of 5
Author
NKurzman
A Guy on the Net
• Total Posts : 18976
• Reward points : 0
• Joined: 2008/01/16 19:33:48
• Location: 0
• Status: offline
Re: Elevator Algo 2018/08/20 13:54:02 (permalink)
+2 (2)
You need to first figure out how you elevator works.
assuming 12 floors (1 call button per floor, or an up and a down?)
12 floor buttons in the car.
what ever other switches in the car.
so step one is to scan all you switches to look for button presses.  Fill an array with this.
one the array has at least one call. the elevator is started in the correct direction.  as more calls are added the car will decide if it needs to stop at a floor. when it finishes one direction, it will either stop or reverse in to other direction.  it will repeat this until there are no more calls.  on some systems if all the calls are done the car will go to the Lobby floor, other wise it will stop and wait for more calls.
If you are in a country with a safety code you will need to document and have your code approved. this can take as long as the codding, maybe more in this case.

You do see how your very basic questions make people nervous since this is an item that can kill people if it malfunctions.
naeem1234
Super Member
• Total Posts : 453
• Reward points : 0
• Joined: 2015/02/19 06:39:28
• Location: 0
• Status: offline
Re: Elevator Algo 2018/08/20 14:18:58 (permalink)
0
NKurzman
You need to first figure out how you elevator works.
assuming 12 floors (1 call button per floor, or an up and a down?)
12 floor buttons in the car.
what ever other switches in the car.
so step one is to scan all you switches to look for button presses.  Fill an array with this.
one the array has at least one call. the elevator is started in the correct direction.  as more calls are added the car will decide if it needs to stop at a floor. when it finishes one direction, it will either stop or reverse in to other direction.  it will repeat this until there are no more calls.  on some systems if all the calls are done the car will go to the Lobby floor, other wise it will stop and wait for more calls.
If you are in a country with a safety code you will need to document and have your code approved. this can take as long as the codding, maybe more in this case.

You do see how your very basic questions make people nervous since this is an item that can kill people if it malfunctions.

Thanks a lot for your very helpful starting point and over-all code architecture. Things are making sense to me now.
JorgeF
Super Member
• Total Posts : 3345
• Reward points : 0
• Joined: 2011/07/09 11:56:58
• Location: PT/EU @ Third rock from the Sun
• Status: offline
Re: Elevator Algo 2018/08/20 16:46:16 (permalink)
+3 (3)
Hi

One important thing.
If I got it right, your project is to replace the processing unit of an existing controler.
So the first thing you need is to make an exaustive analysis off the board operation in terms of operation logic, inputs and outputs.
The first step would be to mimic its operation, its a proven equipement and people will expect the board with the new processor to operate as they are used to.
For sure, during the development process, you will come up with some ideas for interesting improvements, but don't try to apply them this time. Take some notes and latter on you can make a suggestion for a second project with the improvements.

Best regards
Jorge

I'm here http://picforum.ric323.com too!
And it works better....
naeem1234
Super Member
• Total Posts : 453
• Reward points : 0
• Joined: 2015/02/19 06:39:28
• Location: 0
• Status: offline
Re: Elevator Algo 2018/08/20 20:32:40 (permalink)
0
JorgeF
Hi

One important thing.
If I got it right, your project is to replace the processing unit of an existing controler.
So the first thing you need is to make an exaustive analysis off the board operation in terms of operation logic, inputs and outputs.
The first step would be to mimic its operation, its a proven equipement and people will expect the board with the new processor to operate as they are used to.
For sure, during the development process, you will come up with some ideas for interesting improvements, but don't try to apply them this time. Take some notes and latter on you can make a suggestion for a second project with the improvements.

Yes that is understandable. The PCB board level task is going to be done by other team members and I hope they do it correctly. So far I am waiting for a prototype board for my code testing.
PStechPaul
Super Member
• Total Posts : 2951
• Reward points : 0
• Joined: 2006/06/27 16:11:32
• Location: Cockeysville, MD, USA
• Status: offline
Re: Elevator Algo 2018/08/20 21:05:25 (permalink)
0
The hardware design usually must be done in close collaboration with the software engineer. There are many different processors to choose from and they have widely varying pinouts and functionality.

JorgeF
Super Member
• Total Posts : 3345
• Reward points : 0
• Joined: 2011/07/09 11:56:58
• Location: PT/EU @ Third rock from the Sun
• Status: offline
Re: Elevator Algo 2018/08/21 02:04:01 (permalink)
+1 (1)
Hi
PStechPaul
The hardware design usually must be done in close collaboration with the software engineer. There are many different processors to choose from and they have widely varying pinouts and functionality.

Besides that the PIC I/O can be mapped, either PPS or simple code changes, so its important for the firmware developer to be in close contact with the PCB designer.
In projects were I do both things, I allways have the PIC datasheet at hand during the routing process, and usually there is some (a lot), adjustements on the initial pin assignement to sort out routing problems.

Best regards
Jorge

I'm here http://picforum.ric323.com too!
And it works better....
naeem1234
Super Member
• Total Posts : 453
• Reward points : 0
• Joined: 2015/02/19 06:39:28
• Location: 0
• Status: offline
Re: Elevator Algo 2018/08/21 12:11:05 (permalink)
0
JorgeF
Hi
PStechPaul
The hardware design usually must be done in close collaboration with the software engineer. There are many different processors to choose from and they have widely varying pinouts and functionality.

Besides that the PIC I/O can be mapped, either PPS or simple code changes, so its important for the firmware developer to be in close contact with the PCB designer.
In projects were I do both things, I allways have the PIC datasheet at hand during the routing process, and usually there is some (a lot), adjustements on the initial pin assignement to sort out routing problems.

I keep myself away from the hardware guys because it's normal that it takes many iterations to reach at the final design but still if something require revisit then the blame game starts as to who is responsible for this mistake and a software person is a convenient scapegoat for them.

But i also understand that hardware mistakes are costly and time taking to be fixed so it require more clarity as to who should be part of the design process and who should not.
NKurzman
A Guy on the Net
• Total Posts : 18976
• Reward points : 0
• Joined: 2008/01/16 19:33:48
• Location: 0
• Status: offline
Re: Elevator Algo 2018/08/21 12:36:51 (permalink)
+2 (2)
So you are letting the Hardware guys choose the pins for you? I hope they can read the data sheet and the Eratta.
naeem1234
Super Member
• Total Posts : 453
• Reward points : 0
• Joined: 2015/02/19 06:39:28
• Location: 0
• Status: offline
Re: Elevator Algo 2018/08/21 13:14:17 (permalink)
0
NKurzman
So you are letting the Hardware guys choose the pins for you? I hope they can read the data sheet and the Eratta.

Yes.. i believe hw people are good at reading the datasheets..
JorgeF
Super Member
• Total Posts : 3345
• Reward points : 0
• Joined: 2011/07/09 11:56:58
• Location: PT/EU @ Third rock from the Sun
• Status: offline
Re: Elevator Algo 2018/08/21 14:22:22 (permalink)
+5 (5)
Hi

"How can make X comms work without signal Y....bla...bla....bla, the  datasheet says ...bla..bla..bla....but the boards are already built and can't be changed."

Best regards
Jorge

I'm here http://picforum.ric323.com too!
And it works better....
qhb
Superb Member
• Total Posts : 9999
• Reward points : 0
• Joined: 2016/06/05 14:55:32
• Status: offline
Re: Elevator Algo 2018/08/21 15:11:25 (permalink)
+2 (2)
naeem1234
NKurzman
So you are letting the Hardware guys choose the pins for you? I hope they can read the data sheet and the Eratta.

Yes.. i believe hw people are good at reading the datasheets..

And here we see the first seeds of yet another "it's too late to fix the hardware" problem.

Nearly there...
1and0
Access is Denied
• Total Posts : 11339
• Reward points : 0
• Joined: 2007/05/06 12:03:20
• Location: Harry's Gray Matter
• Status: offline
Re: Elevator Algo 2018/08/21 18:36:11 (permalink)
+4 (4)
When I am the one who'll write the firmware, they must have my approval of the schematic before the board layout is routed. It's easier when I'm the one who routes the board too. ;)

PStechPaul
Super Member
• Total Posts : 2951
• Reward points : 0
• Joined: 2006/06/27 16:11:32
• Location: Cockeysville, MD, USA
• Status: offline
Re: Elevator Algo 2018/08/22 00:22:07 (permalink)
0
With modern PCB design software, you can get 100% autorouting on most moderately complex boards, and you have design-rule checking (DRC) and design for manufacturing (DFM), So there should not be very many design iterations before releasing for production. You do need to make sure your schematic is correct, and double check all part decals to make sure they have the proper pinout and fit for the leads, especially for SMDs. Also, prototype boards are now so cheap that you don't need to fret about extensive manual checking.

Perhaps the most difficult task is proper placement of components, especially connectors, so that final assembly and wiring works efficiently. Newer PICs with PPS registers makes this less critical, and easier to fix, but you do need to beware of special functions that are pin specific.

JorgeF
Super Member
• Total Posts : 3345
• Reward points : 0
• Joined: 2011/07/09 11:56:58
• Location: PT/EU @ Third rock from the Sun
• Status: offline
Re: Elevator Algo 2018/08/22 05:22:18 (permalink)
+2 (2)
Hi

As I see it.
- Connectors, push-buttons and other mechanicals usually have pre-defined fixed positions due to housing restrictions, so it is what it is.
- Components placement and clearances, besides electronics technicalities, must follow some fabrication guidelines that can change from one manufacturer to another.
- Pin assignements is what directly involves the firmware development.
This last subject is what motivates more iterations. Microcontrolers, even without PPS, are very flexible in what you do with each pin, and it only takes a few code changes to move generic I/O assignements, like pure digital I/O or ADC inputs from one pin to another. Its exactly this flexibility that allows for the firmware developer to be a big help in the routing process. Whenever some track(s) gets a bit too long, too twisted, requires bridging, or any other routing issues, theres is a chance that reasigning a couple of I/O functions can really simplify the PCB design process.

Best regards
Jorge

I'm here http://picforum.ric323.com too!
And it works better....
naeem1234
Super Member
• Total Posts : 453
• Reward points : 0
• Joined: 2015/02/19 06:39:28
• Location: 0
• Status: offline
Re: Elevator Algo 2018/08/30 22:37:20 (permalink)
0
Can you tell me about the 'S curve' or 'Comfort curve' that is used in the lift travel for smooth starts and stops?
Is this speed profiling is part of the Lift-Controller or the VVVF Invertor?
Francesco C
Senior Member
• Total Posts : 152
• Reward points : 0
• Joined: 2010/08/08 14:33:14
• Location: UK
• Status: offline
Re: Elevator Algo 2018/08/31 02:40:11 (permalink)
0
t is called the 'S' curve for good reason.
The 'S' curve describes the acceleration profile of the Elevator.

In the begin is starts very slowly.
Then it starts to accelerate to a Max speed.
Then decelerate  gradually so that the passengers do not feel it.
Then stops.

If you were to plot the above it gives you a 'S' shaped graph.

All of these parameters are dependent of many factors.
Distance of travel and the level of comfort are the crucial element of the 'S' curve.

The controller needs to know the technical data of the inverter (and the motor).
The controller then operates the Elevator within the above limits to achieve the best 'S' curve.

Regards

naeem1234
Super Member
• Total Posts : 453
• Reward points : 0
• Joined: 2015/02/19 06:39:28
• Location: 0
• Status: offline
Re: Elevator Algo 2018/08/31 03:09:30 (permalink)
0
Francesco C
The controller needs to know the technical data of the inverter (and the motor).
The controller then operates the Elevator within the above limits to achieve the best 'S' curve.

Thanks for the explanation. So the 'S curve' is generated by the Controller firmware based on preset values.
Francesco C
Senior Member
• Total Posts : 152
• Reward points : 0
• Joined: 2010/08/08 14:33:14
• Location: UK
• Status: offline
Re: Elevator Algo 2018/08/31 03:28:11 (permalink)
0

Thanks for the explanation. So the 'S curve' is generated by the Controller firmware based on preset values.

'Generated' is not the right word. You have to input the values, manually, in settings of the Drive/Controller.
Generally these values are stored in the Drive, as this is the hardware that drives the motor.

Think like this: The Controller tell the Drive (or Converter) that the lift has to move UP/Dowm
The controller knows how far is the floor it is going-to.
Then sends the right instruction to the Drive so that the correct 'S' curve is generated.

Regards
naeem1234
Super Member
• Total Posts : 453
• Reward points : 0
• Joined: 2015/02/19 06:39:28
• Location: 0
• Status: offline
Re: Elevator Algo 2018/08/31 04:14:32 (permalink)
0
Francesco C
Then sends the right instruction to the Drive so that the correct 'S' curve is generated.

So the Controller will have the S-curve values in a lookup table and will keep sending those to the Drive periodically, maybe after every 500ms until the travel is complete.
Francesco C
Senior Member
• Total Posts : 152
• Reward points : 0
• Joined: 2010/08/08 14:33:14
• Location: UK
• Status: offline
Re: Elevator Algo 2018/08/31 04:31:49 (permalink)
0
naeem1234
Francesco C
Then sends the right instruction to the Drive so that the correct 'S' curve is generated.

So the Controller will have the S-curve values in a lookup table and will keep sending those to the Drive periodically, maybe after every 500ms until the travel is complete.

That is the general scheme. The controller knows were the lift is and what speed is doing at any time.
The drive is always in communication with the controller, so that can act for any eventuality.
How often the data is shared depends from the design, and how quick you want it to react.

Regards

Page: < 12345 Showing page 5 of 5