Lists

Discuss issues and ideas you have to configuring displays with PowerVision
CustomFP
Posts: 41
Joined: Thu Mar 22, 2012 4:12 pm

Lists

Post by CustomFP » Mon Nov 10, 2014 7:30 pm

I need to be able to store Several Calibration Parameters each for many functions.
If would be very convenient if rather then creating 40-ish variable which each need an event and a line of code to change the values, I could use a "list". Is this possible.
This would make it a lot easier to tuning these parameters as a single event/button pressure could easily be used for increasing or decreasing a parameter and another button could scroll through the functions.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Lists

Post by stalley » Tue Nov 11, 2014 9:54 am

Hello CustomFP,

What you have described is a good way to take advantage lists. PowerVision Configuration Studio has changed the DM interface to use lists since they provide more versatility.

You have probably noticed in the script Function Reference there are ways to easily navigate through a list and there are actions under the CCM to be used in an activity program or state machine. There is a separate action, NVMgr->SaveList() to use so the data will persist through a power cycle.

There are a couple of simple configurations on the forum that read/write/navigate lists that might help you get started.

Hope you find lists useful!
Sara Talley
Software Engineer
Enovation Controls
CustomFP
Posts: 41
Joined: Thu Mar 22, 2012 4:12 pm

Re: Lists

Post by CustomFP » Tue Nov 11, 2014 4:35 pm

I can't seem to find any good list examples, can anyone link any to me?
Thanks.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Lists

Post by stalley » Wed Nov 12, 2014 7:59 am

Hi!

There is one example with the 2.7 Patch 1 that might help, viewtopic.php?f=26&t=933. This uses an activity program to add data to a list that is displayed in a graph. Using an activity program to manipulate the list makes it easy to display data in a graph.

I am attaching another example that manipulates a list in scripts. It displays the list data and you can see how to use the list data binding on text gauges.
DEMO - CustomListData in Script.zip
(681 KiB) Downloaded 100 times
Maybe there are others out there that have examples they wouldn't mind sharing!
Sara Talley
Software Engineer
Enovation Controls
CustomFP
Posts: 41
Joined: Thu Mar 22, 2012 4:12 pm

Re: Lists

Post by CustomFP » Tue Nov 18, 2014 4:49 pm

Thanks Stalley,

That is a good example however I don't believe it shows how to read data from the list using scripts?

Or am I just missing that part?

If anyone has any information on how to read from lists using a script that would be really good.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Lists

Post by stalley » Wed Nov 19, 2014 9:10 am

Hello,

Well, this is my very simple attempt at reading and writing a list in a script.

Press the Write button and it will fill out a two column list. You won't see much here.

Press the Read button and it will scroll through the list and display it on the screen.
DEMO - ReadWriteList.zip
(677.96 KiB) Downloaded 91 times
The script is in the ~~Demo group.
Sara Talley
Software Engineer
Enovation Controls