PV780 Displaying data in table

Discuss issues and ideas you have to configuring displays with PowerVision
andymartyn
Posts: 25
Joined: Wed Oct 29, 2014 4:51 am

PV780 Displaying data in table

Post by andymartyn » Wed Jan 28, 2015 5:33 am

I am using PV780
PowerVision 2.7.10475

I have a number of IX32s in my system and want to be able to display a table of errors on outputs. Ideally I want to be able to have a scrollable list of errors displayed but am having some trouble and wondered if there was a simple way to do what I wanted.

I looked towards the DM2 for inspiration and so currently I have a page with rectangles with visibility associated to a variable so I can scroll through the table made of rectangles and each row has a text box associated with an output. However for 6 IX32s and needing to do every page and change each variable and binding is taking a significant time as well as not allowing me to only display the errors. Also leading to the potential that I bind to the wrong variable

So really, is there a simple way to have one page that has data that changes depending on a chosen IX32 and updates the table to only display a number of errors that I can scroll through? I am thinking I could raise an event on navigation to the page to determine which PDM was selected but how you would then populate a table is where I am hitting a brick wall

It’s something that sounds really simple but it’s feeling like a lot of effort and its hard to relate that effort to man hours when asked why from the powers that be

I was thinking I could have an event on entering the page and have each cell of the table bound to a string that is updated on entering the page using scripting based upon a global variable holding the value of the IX32 I am interested in or maybe associating with a list somehow but would the changing of so many strings (or updating a list) on each navigation be a bad idea for performance or memory? Are there better ways? Is there an easy way to clear and rebuild lists or is this an inappropriate use of them for my need?
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: PV780 Displaying data in table

Post by stalley » Wed Jan 28, 2015 8:21 am

Hello andymartyn,

Right now, I have a few questions for you. How are you storing the incoming errors? Have you looked at using Containers as a way to control visibility? How many columns of data do you need?

PV780s have a lot of memory and processing power, so you have some resources to work with. If you are concerned about 6 lists for the IX32s errors, it will depend on what else the display is doing and how many "rows" of data that need to be handled of course, but the PV780 should be able to handle it.

PowerVision provides a lot of flexibility so programmers can make the display do some amazing things. It sounds as though you are truly using the configuration tool and the displays to provide useful information to your customers in a meaningful way.
Sara Talley
Software Engineer
Enovation Controls
andymartyn
Posts: 25
Joined: Wed Oct 29, 2014 4:51 am

Re: PV780 Displaying data in table

Post by andymartyn » Wed Jan 28, 2015 8:37 am

The errors are fromn the diagnostic bits on the IX32, so each output has a state on the diagnostic bits and the values 1 (short circuit) and 2 (over current) would be classed as errors. Open circuit cannot be used as the current drawn is < 0.75A and so doesn't record correctly. I have considered containers in some areas but at the moment it is a table with 4 columns and 12 rows (To represent the theoritical maximum of 12 errors on the outputs although it is extremely unlikely this would ever happen)

I was planning on something like: "Enabled | Output | Active | Description" for the table headers

With Description being a text representation of "Short Circuit", "Open Circuit" and enabled being a small icon to show the output is able to be used (I can bind to the visibility by a list flag). Active means it is in use and Output is a textual reference for the use of the user to know which output is being referred to. Then upon navigation to the page would detect which IX32 the user is interested in, empty the list and repopulate by manually going through each output and if there was an error add it to the list that is shown in the table. Without looking directly at the CAN messages produced by the IX32s it seems a bit of a manual process unfortunately but shouldn't be too bad to do but this way was only using one list and rebuilding as needed

Knowing the size of the list should enable a state machine to handle the scrolling and if I add a field to the list that refers to the number of the output I should be able to add a switch statement that takes the currently selected value in the table in order to turn the output off and on in order to try and replicate a software reset of the output. A problem with this is that if the state of an output changes whilst on the page it doesn't immediately change which it would do if I had each output linked directly to the diagnostic bits.

I am also having problems with the lists not updating the screen as I expect, perhaps it is to do with how I clear and populate them. I had assumed if you remove all items and then add to the list it would add them at the start of the list but my bindings are not working as I expected and the data is taking random places even though I am using FixedOffset

It's a bit more complicted that I wanted but the customer only wants errors listed in the table rather than all status's (which would be easier)
andymartyn
Posts: 25
Joined: Wed Oct 29, 2014 4:51 am

Re: PV780 Displaying data in table

Post by andymartyn » Mon Feb 02, 2015 5:45 am

I have been trying lists and making some progress
I couldn't see any way to clear a list so made an assumption on how you would do this as I think you would need to do this backward. Is this the only way or is there a better approach?

Code: Select all

	ListManagerLock(ListDataType.PDM_ErrorList);
    
	for (int index = ListManagerGetCount(ListDataType.PDM_ErrorList); index > 0; index--)
	{
		ListManagerRemoveItem(ListDataType.PDM_ErrorList, index - 1);
	}
	
	CustomListData data;
	
	data.WriteString(CustomListColumn.PDM_ErrorList_Output, "Output1");
	ListManagerAddItem(ListDataType.PDM_ErrorList, data);

	data.WriteString(CustomListColumn.PDM_ErrorList_Output, "Output2");
	ListManagerAddItem(ListDataType.PDM_ErrorList, data);
	
	data.WriteString(CustomListColumn.PDM_ErrorList_Output, "Output3");
	ListManagerAddItem(ListDataType.PDM_ErrorList, data);
		
	ListManagerUnlock(ListDataType.PDM_ErrorList);
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: PV780 Displaying data in table

Post by stalley » Mon Feb 02, 2015 8:59 am

Hello andymartyn,

Have you tried it? Does it work? It looks good to me! :)
Sara Talley
Software Engineer
Enovation Controls
andymartyn
Posts: 25
Joined: Wed Oct 29, 2014 4:51 am

Re: PV780 Displaying data in table

Post by andymartyn » Mon Feb 02, 2015 9:35 am

I have tried it and it works fine. I was just wondering if there was an easier "Clear All" type command.

I am now looking at the diagnostic bits for the IX32s. It's a very manual process. It's unfortunate you cannot ask for a variable to bind directly to an array as it would have made things substantially easier but never mind