Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Garyhlucas on July 27, 2015, 03:44:46 PM
-
I am trying to put together a page in a Cmore HMI to show data total for each of the past 6 months with a start and end date for each month. I also have another screen with the date and daily totals for 31 days. Confused on how to do this. It appears Cmore supports SDT UDT data types. I need to change the date at midnight each night and shift the daily totals and dates down one letting it scroll off at 31 days. Then each month I need to change the start date, and move the all the monthly totals down letting the last one scroll off. I've done this before in other PLCs but it appears that Do-More and C-More can do this in a lot more elegant way. Hints?
The program I am working on consumes about 100,000 bytes at the moment, looks like it'll fit.
Thanks,
-
Been holding off working on this code hoping someone would suggest how to do it in DoMore. No suggestions?
-
I'll take a stab at part of this.
It appears Cmore supports SDT UDT data types.
Yes it does. But for whatever reason the Cmore will not import these tag names from DMD. They must be manually created in Cmore. Maybe hosties can look in to this and determine why.
I need to change the date at midnight each night and shift the daily totals and dates down one letting it scroll off at 31 days.
Create a contiguous block of 32 memory locations. For example D0-D31. Put a 0 in D0. Put todays data in D1. At midnight do "MOVER" with the start being D0, length 31, destination D1.
I know this does not answer all of your questions, but maybe it will get you started or at least motivate one the smarter guys to respond.
-
C-more isn't a Host product. Not a great answer, I know, but there is really nothing else we can do.
I know that some folks have used STRPRINT to format time and date information in the PLC, rather than do so in C-more.
-
Okay,
I knew how to shift the data, I've done that in AB, and on a DL205 where my data tables actually used up the entire memory of a 260 processor. It is the UDT stuff I don't understand. I was hoping maybe the C-more uses it and can display a date that is in that format. I live in NJ and work for a company 160 miles away, where to PLC is located. So I work from home as much as possible. I guess I need to set up the spare PLC and take it home to test this kind of stuff. When I get it working I'll post about what I did.
-
The Sim is great for developing and testing stuff that doesn't require I/O.
-
You will need to store and shift your data as has already been stated. You can then set up a block of 10 (or whatever the quantity you want on one screen) of SS or SL memory locations. Now set up a task in your Do-more. At the top of your task set up some MATH boxes to calculate your starting and ending display pointers. Now insert a FOR with the starting and ending addresses that you just calculated. Inside the FOR loop, you can place a STRPRINT that can format each of the indexed values from your table. Now on your C-more, you only need to place 10 text displays on the screen, with an increment/decrement object with an offset of 10.
Use the increment/decrement value in your PLC program with a Delta contact to trigger the task, and then use this same value for all of your MATH box calculations at the top of the Task.
I think I probably made this about as clear as mud... Please post back with screenshots of what you have so far.
I can try to throw a sample together for you if you can post some of what you have so far.
-
Nut,
No, you did good, it makes sense to me. The concept I was missing was making this a Task. I used them for I/O and I've I used stages a lot but I kind of overlooked the Task function.
Thanks,