Idec MicroSmart RAM problem

Qbrix

Member
Join Date
Dec 2004
Location
Denmark
Posts
5
Hello all
First things first - I'm a total new to this. It's my first PLC experience ever, so... I have programmed Windows software for 9 years though, so not all aspects are new to me.

I'm programming an Idec Microsmart (20 something..) which I've equipped with a clock and a 64K Ram module. And I'm using the program WindLDR v4.50.

I'm supposed to make it count visitors in a public toilet and record the time where the visitors are going through the door.
I figured that with approximately 64.000 bytes to my availability, I can record 32.000 visits. But here comes my problem:
How can save my 2 bytes 32.000 times ?
I simply can't figure it out.
Do I have to use Shift Registers (of which I don't have that many) ?
Or should I declare a lot of Data Registers ?
Or is there (hopefully) a much smarter way to do so ?

Best regards
Jorgen Brix
 
I don't know Idethat well, I used a Micro about 4 years ago.

First - an input will be needed to sense that a visitor entered the room, or sat down, or flushed, whatever you want to record. It will be up to you to decide how to sense visitors. e.g. if you use the door, you will have approximately half as many visitors as door cycles.

You should only need one shift register, which will be a pointer to the data stack you are creating. Each time you get a visitor, store the time data and increment the stack pointer.

Depending on how you record the time, you can be quite wasteful or quite thrifty with memory. If the assignment says "record time", then don't worry about date, and make up an integer based on the number of minutes, or seconds, since 00:00h that day.
 
Well - next things next...

I already have an input sensor attached, and that part is working. The "problem" with wasting space is solved as well (as I wrote, I have been programming PC's for years now)

My real problem is how to access the RAM and how to save my bytes.
But as you wrote, my problems solution might be a "data stack and a single shift register", whatever that means...

Anyway thank you very much - I'll look for som info about it.
Do you have any further clues about how to do it (the RAM part that is) ?

Best regards
Jorgen Brix
 
Not on an Idec, but in an Omron I would use a MOVe to pop the data, and an INC for the pointer, or the dedicated WordShift commands; can use the same instructions and also has a couple dedicated FIFO commands.

Something like:

LD INput_Entered
COPY time to (adddress pointer is indicating)
INCrement pointer

Look for similar commands in the Idec.
 
Qbrix,

Perhaps you are seeing the "trees" and can not see the "forest"? You don't need very much memory storage at all to collect useful data on Visits to the Toliet. The question you should ask: What would my Customer really want to know about visits to the toliet? I would think that he wants to know when the busy times of day are, which days of the week do the most people come in, and is the toliet large enough, or should a larger one be built?

I would do it like this:

1. Set up 24 PLC Counters, C0 through C23, 1 for each hour of a 24-hour day.

2. When the PLC Clock is = Hour 0, and a visitor enters, increment Counter C0 by 1, and at Hour =1, when a visitor enters, increment Counter C1, and so on.

3. At the end of a Day (clock = 23:59:59 maybe), you can total the value of all 24 Counters to get the total visitors for that Day. Save this number in an Integer memory location, call it D1. Do this for each day of the Week, using D1 up to D7. Each 16-bit memory location should be able to store a number up to 32,627. This should be enough for most toliets for a week of visits.

4. Now you can tell your Customer which Hours of the Day are the busiest, how many people came in those hours, and which Days of the Week are busiest.

5. You can break it down more, and save the total visits for each month (M1 to M12), and then find which months of the year are busiest. You might need 32-bit Integer numbers to store the months and years of data. Check to see if your PLC supports 32-bit numbers.

That is enough for now. I have got to get my mind back out of the toliet...
 
Last edited:

Similar Topics

Greetings to All I have IDEC microsmart FC4A - c24r2 PLC... I need to format the old program in that... it was password protected. How do I...
Replies
2
Views
1,588
I am currently using Direct logic PLCs and C-More touch panels and was approached by an IDEC rep. Does anyone have any experience with both of...
Replies
0
Views
1,752
Could anyone share the pinout of cable connect between PC and PLC IDEC Microsmart Pentra FC4A-KC4CA Serial programming cable for FC4A and FC5A...
Replies
5
Views
5,452
I saw a blurb somewhere one time that Idec MicroSmart series PLRs were rebranded Twido's (or the opposite). I have never used the Idec series, but...
Replies
1
Views
2,616
I'm trying to program an IDEC Microsmart series PLC. The WindLDR program does not have a built in retentive timer. I am trying to create a cook...
Replies
5
Views
2,758
Back
Top Bottom