1

Topic: Saving settings

I am having problems saving the current state of a bunch of generic controls. There may be other controls that aren't being saved also, but the most obvious and troublesome symptom is with the generics. The .npa file in question can be found at <redacted>. System is currently running Nware 1.2.4 and ConMan 1.2.5.

Due to operational requirements, this system uses scripts to implement preset storage and recall functionality. Basically the values for each preset are assembled into a string and stored in a generic string control. Here's my problem:

I deploy and make presets, which cause changes to the contents of various generic controls.

I save default settings and then save the project.

If I now take that .npa file and emulate it, my changes have been lost, reverted to some previous value. This of course is also the case if I deploy instead of emulate.

2

Re: Saving settings

I've taken a look at the NPA file (and removed the link above).  Could you give me a detailed step by step on how to reproduce the problem?  It is a fairly large and impressive project file and I'm not sure where exactly to start.  Also, I'll put the link back after you confirm that you and the customer are ok with it being public.  Or, better yet, cut the project back to the minimum necessary to demonstrate the issue, make it generic, and repost it.  Thanks!

3

Re: Saving settings

On other thing.  I notice that your defaultuser does not have save settings permission.  Any chance this is your problem?  See here:

http://peaveyoxford.com/forum/viewtopic.php?id=93

4

Re: Saving settings

I did notice that previous thread concerning default settings, but no one ever uses the defaultuser account. Usually the pwadmin account is used to make backups that are saved to disk. I was also using the pwadmin account when trying to replicate the problem. The pwadmin account has all privileges. The pwadmin password is nware, the pwtech password is nion.

Here's the process by which I replicate the problem:


The file is deployed and running as normal.

I, or one of the techs, log on. Nware or kiosk is fine. At this point it could be any account save for the defaultuser. No one knows about that account and I'm pretty sure it's never used.

Navigate to the Preset tab and open up one of the preset's setup window. Now, for example, select/unselect some parameters and save the preset. This will cause the preset's script to record the selected parameters' current live settings to a generic string control. If you look under the System tab in the associated preset's block, you should find the string control that is used for storage.

Another way we make/modify Preset data is in the Offline Editor block at the bottom of the Preset tab. If you open that up it will allow you to load and save presets into a set of dummy controls. This allows the modification of presets without disturbing the operation of the park. Either way, live or offline, causes changes in the preset storage strings and the presets' parameter enables, which are just a bunch of boolean generics.

Now, either go online or upload and go online with Nware using the pwadmin account. Save default settings and then save(to disk). As I understand it, this should save the current settings of everything internally in the Nion so that it would reboot into its current state and I now have a backup of the project, with the current state, on my computer.

I would then take this file and emulate it on my laptop. I guess you could also redeploy it, but at the time I could not interrupt the system. In any case, the data *SHOULD* be the same as what is currently running, but it is not.

As far as making the file public, I thought this was a private support forum. Anyway I've never asked the client. If you guys at PDR have it to work with, I guess that's all I need.

5

Re: Saving settings

I don't know if this helps, because I'm not following exactly how you are using the generic controls, and I haven't seen your Project.  But a "save values as default settings" is not going to save any presets.  Only a full save will save Presets, and then you must do a deploy to get this new save into the Nions.

Presets are not values, they are presets, and are saved to another set of XMLs in the .npa.  Only values are saved to the default settings XML, which means the generic controls values are saved as values when a default save is done...but not to a preset.

What you are trying to do sounds as if a Snapshot might work.  A Snapshot is a group of values that are loaded when the load button is pressed.  You can go to control properties on the "value" controls, and check the box so the control will accept user input.  Now you can type in the value that you want the load to do.  When you now do a default save, these will be saved, because they are "values".  BTW, I always create the Snapshot as a string style, seems to always fit the task best.

I help this helps.

Make it intuitive, never leave them guessing.

6

Re: Saving settings

Sorry for the confusion about my nomenclature. I am using the term 'preset' as a mechanism that allows the user to store and recall values for a desired set of controls. I do not mean the global or subpreset devices.

Because global/sub preset devices and snapshots did not provide the needed functionality, I wrote a set of scripts to do it. These scripts use a string generic control to hold the stored values. The main problem I am having is when I save the file, the values of these string generic controls don't seem to be saved.

I'll send you an email with a link to the project file.

7

Re: Saving settings

Don't forget that when you're prompted to save settings as default, saying yes saves the system-wide default preset, otherwise it's whatever they were last time they were saved, right or wrong.  Every time the NION wakes up, it goes right back to the default settings you said yes to unless you turn on Auto Save Settings.  Auto Save saves everything to the default preset every few seconds so the NION wakes up with the same settings it had when it went to sleep. Do the values get saved if you turn on Auto Save?

The only true wisdom is in knowing you know nothing. -Socrates

8

Re: Saving settings

Ok, so I tinkered around some more and think I may have narrowed it down. It seems that the problem may have something to do with the last time the project was compiled. Here's the test I did:

1. Opened up the project and emulate.

2. Make some changes and note the resulting value in one of the generic string controls.

3. Save default settings and save the file.

4. Close Nware.

5. Open the project up and note the value in the string, which was the same when I saved it. So far so good.

6. Emulate.

The string value reverts back to some older setting.

Now I don't think that is the way things should operate, but I may be wrong. Here's the second test I did:

Repeat steps 1-5. Same results as before, good.

Instead of just emulating, force a recompile and emulate. Now the string value stays the same. This is what I understand should happen but without the recompile.

9

Re: Saving settings

After speaking with Charles, it seems that having multiple instances of these generic string devices, one of which was setup as a slave node may be the problem. This turned out to be the case. If I unwired that particular copy that was a slave node, the value for that string control would save with the default settings correctly.

Now I think I've found a way around using the string as a slave node with a virtual assignment device and a dummy 'buffer' string. However it seems that virtual assignment devices don't work with string controls. What's the deal with that?

Thanks again,
Jason Valenzuela