You bet, I wanted you to sign me off on the last Mission first thoughDo you want another mission?
It's one thing me thinking I've done something right, it's another being told I have.
Dave
You bet, I wanted you to sign me off on the last Mission first thoughDo you want another mission?
It's one thing me thinking I've done something right, it's another being told I have.
Dave
Last edited by LEDave; - 4th May 2010 at 21:48.
So far you have been letting PBP take care of the EEPROM address "B1".
Now we want to control where in the EEPROM data is written to as we will be storing and retrieving multiple pieces of data.
Using the same basic scenario as before, part counting on a conveyor.
This time the machine and personnel have been upgraded to run 24/7. The only time the machine will be shut down is for maintenance, scheduled or un-scheduled.
Management still wants to know the total parts ran, and the maintenance department wants to know how many parts are being ran between shut downs, how many shut downs there were and because they are lazy they also want the machine to average the amount of parts ran between each down.
Who says computers and automation cuts jobs? We went from running one shift to three and added coder to the mix along with all of the supply/demand personnel to handle the increased production.
Dave
Always wear safety glasses while programming.
Ok.....Mmm...,
Well for this I'm thinking (although I could be wrong here):Now we want to control where in the EEPROM data is written to as we will be storing and retrieving multiple pieces of data.
So we need:Code:WRITE 5,B0 ' Send value in B0 to EEPROM location 5
1/ Total parts run
2/ Total parts run before M/C stops for maintenance
3/ How many times M/C shuts down (scheduled + un_scheduled)
4/ The average amount of parts run between each shut down (scheduled + un_scheduled)
I think I've read that right?
Dave
Yup
Remember two address locations for WORD size variables.1/ Total parts run
2/ Total parts run before M/C stops for maintenance For each run, need multiple address here too.
3/ How many times M/C shuts down (scheduled + un_scheduled)
4/ The average amount of parts run between each shut down (scheduled + un_scheduled)
Hopefully the machine will run long enough to need a WORD VARs for parts run between shut downs, and if all goes well the machine will not shut down often so a BYTE size VAR should work for "times shut down".
Dave
Always wear safety glasses while programming.
I'm on it, tricky in parts but I'm on it
How many EEPROM locations are there on a PIC16F684?
As in:
DaveCode:EEPROM location 5
I think the 684 only has 256, if I remember correctly.
Dave
Always wear safety glasses while programming.
Is that sequential 0-255?
Srub that, it's got to be I'm thinking.
See you tomorrow.
Dave
Last edited by LEDave; - 5th May 2010 at 00:52.
Bookmarks