0
Under review

Persistant Virtual Server Variables : how to get them working?

Dennis Piet 2 months ago in Bugs and problems updated by Vladimir Ovchinnikov 2 months ago 4

For a parkingsystem I use some Virtual Commands / Channels in combination with Feedback / Tags to store the maximum capacity of a parking.

For example, for Parking 1, I have

Server.Channels.P1_Capacity

and

Server.Tags.P1_Capacity


As per the manual I have connected them with the virtual_to_virtual in the script modifier of the channel (and now with newer Iridium Studio version I can also use Forward Value To for this)

I have set the Persist property of Server.Tags.P1_Capacity to true.

Expected behavior : after server reboot (or restart after powerloss), the Capacity variables keep their last know value.

Actual Behavior : after restart, all Capacity variables are 0  , so the parking manager has to fill in the capacities again for all 6 parkings.

How can I fix this???

Just to try and understand what is happening, I removed the virtual_to_virtual relation (or the forward) and then manually set the value of the feedback through the webinterface.  Now, when I restart the server, the value persists.

So, I guess the problem is the persisting feedback is overwritten by a 0 value coming from the command just after startup of the server?

Can some admin please moderate this posting, so other users can respond?

Under review

Hello.

In the current release, the "Persist" and "forward value to" parameters should work correctly. Attach your project that is not working correctly.

Thanks Vladimir, I have tested again with my project running on the latest server release and did not get it working as expected. All virtual feedbacks were still empty after each server reboot.

Then I made a new simple testproject with only 1 persistant virtual command forwarded to a virtual feedback, just to show you what settings I was using. To my surprise in this sample-project (with exact same settings) persistency worked perfect.

Then for further testing I added one more virtual command/feedback combination to my main project. This new variable kept it's value after reboot (exact same settings as the P1_Capacity variable mentioned above), but the old onces still did not persist.

At that time, I decided to delete all old persistant variables and just recreate them with exact same names and properties.

So I guess there was something wrong in the way these variables were stored in the serverprojectfile, that could only be fixed this way.

Hello.

You did the right thing. If the project was created in an old version of the Studio (which had an error with saving feedbacks), then you need to delete these feedbacks in the current release of the Studio and create them again.

Do you have any more questions?