![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
Member
![]() Join Date: Oct 2008
Location: SW Ontario
Posts: 7
|
FIFO for 2 dimensional array in RSLogix 5000
Hi everybody!
I'm struggling with 2 dimensional array. The task is simple: to keep records for last 10 user log-ins (user ID# and time stamp). So I created array User_Stamp (DINT[7]) where I put User_ID# to element [0] and date_time_stamp to next 6 elements (discarding ms). Now I'm trying to move this stamp to array Login_History (DINT[10,7]) and shifting data somehow. I found nice solution for one dimensional array but stuck on two... Any ideas? Thanks! |
|
|
|
#2 |
|
Member
![]() Join Date: Jun 2002
Location: Auckland
Posts: 1,134
|
Make User_Stamp a UDT instead of an array and then create a single dimension array of type "User_Stamp".
|
|
|
|
#3 | |
|
Lifetime Supporting Member
|
Quote:
I use a 500 element array of UDT's here for queuing process alarm and flaw tracking. The UDT is defined up with about 20 elements, including string's, and the array of them works perfectly with FIFO's.
__________________
------------------------------------ How to ask questions the SMART Way! Look First, Ask Second! |
|
|
|
|
#4 |
|
Member
![]() Join Date: Oct 2008
Location: SW Ontario
Posts: 7
|
Thanks,
I felt that there should be some solution like this ![]() But now I have another question: how do I display this data on PanelView Plus? I mean I can not use UDT in PanelView, so how do I display elements of my array (User_ID# and date_time)? Thanks again |
|
|
|
#5 |
|
Lifetime Supporting Member
|
Why can't you display elements of a UDT on a PanelView Plus?
I do all the time. [IO_SVR_TOPIC]MyUDT.MyFirstElement [IO_SVR_Topic]MyUDT.MyThirdElement
__________________
------------------------------------ How to ask questions the SMART Way! Look First, Ask Second! |
|
|
|
#6 |
|
Member
![]() Join Date: Oct 2008
Location: SW Ontario
Posts: 7
|
Do I have to define EACH element in PanelView?
Thanks for such quick reply!
It's not because I'm stupid, it's because my boss is mean - no money for professional training... Sorry to bug you again, but the last question: do I have to define tag in Panelview to to EACH element of the UDT or there is some shorter way and I just don't see it? Thanks again! |
|
|
|
#7 |
|
Member
|
Zhopa:
First picture is my udt, it is in spanish but basically is, year,month,day.hour,minute, second,etc., this is the first element of the fifo[0] ![]() Second picture is the final result, as you can see it shows 15 results, this is the size of my fifo.
__________________
My two cents. Last edited by widelto; October 16th, 2008 at 12:12 PM. |
|
|
|
#8 |
|
Member
![]() Join Date: Oct 2008
Location: SW Ontario
Posts: 7
|
Thanks,
it's exactly what I need, but my question is: in PanelView, did you create separate tag for each readout: 13 items in each line and 15 lines, so it's 195 tags? Or is there way to create an array in PanelView Plus? Thanks! |
|
|
|
#9 |
|
Member
|
Zhopa:
Look at muy udt carefully, as i said this is the first element of my fifo i.e. [0] The first line of second image ( element [0] of my fifo) is shown in the next lines, it is a text with embeded variables, and as you can see embedded variables are the data from first element of my fifo, this is what you have to write down in your text in order to appear as in the second picture. Spaces are included just to look fine. Use my example and compare it to yours. /*N:2 [Delta5]Prod_Mensual[15].dia ZEROFILL DP:0*///*N:2 [Delta5]Prod_Mensual[15].mes ZEROFILL DP:0*///*N:4 [Delta5]Prod_Mensual[15].year ZEROFILL DP:0*/ /*N:2 [Delta5]Prod_Mensual[15].hora ZEROFILL DP:0*/:/*N:2 [Delta5]Prod_Mensual[15].minutos ZEROFILL DP:0*/ /*N:7 [Delta5]Prod_Mensual[15].Entrada_Aceite_Ayer ZEROFILL DP:3*/ /*N:11 [Delta5]Prod_Mensual[15].Acumulador_Entrada ZEROFILL DP:3*/ /*N:8 [Delta5]Prod_Mensual[15].Salida_Aceite_Ayer ZEROFILL DP:3*/ /*N:10 [Delta5]Prod_Mensual[15].Acumulador_Salida ZEROFILL DP:3*/
__________________
My two cents. |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Rockwell Allen Bradley Programming Software, RSLogix 5, RSLogix 500, RS Linx, RSLogix | vvcd | LIVE PLC Questions And Answers | 21 | September 24th, 2009 10:04 PM |
| Array element shifting for RSLogix 5000 | crazylizz | LIVE PLC Questions And Answers | 5 | October 9th, 2007 10:11 AM |
| Index String Array in RSLogix 5000 | rta53 | LIVE PLC Questions And Answers | 5 | April 23rd, 2007 05:47 PM |
| RSLogix 5000 array tags (I/O points) | Vuli | LIVE PLC Questions And Answers | 2 | May 4th, 2006 10:14 AM |
| RSLogix 5000 V15 Features | Samneggs | LIVE PLC Questions And Answers | 18 | April 20th, 2006 05:45 PM |