• 30.04.2024, 23:19
  • Registrieren
  • Anmelden
  • Sie sind nicht angemeldet.

 

Lieber Besucher, herzlich willkommen bei: Aqua Computer Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

Difference between Memory X=sh(A) and Persistent Stoarage X=mem(A) Logic Functions

Donnerstag, 18. April 2024, 01:30

In the Playground Logic Blocks there is a Memory X=sh(A) and a Persistent Storage X=mem(A). The descriptions of what these blocks do are identical." If S > 0, then A is saved and forwarded to X". The difference is one is called Memory and one is called Persistent Storage. OK, what does this mean?


Since the descriptions of the logic blocks are identical, I made this Logic Test to see what the difference is between these 2 logic blocks.


The Constant is set to 1 and connected to the S input of both logic blocks, so S in both blocks is 1 which is > 0. The Test Input is set to output 3 and has a fallback value of 0. When I tell the Test Input to output Test Data, it outputs the value 3 for 3 seconds. When the Test Input value is 3 both X=sh(A) and X=mem(A) outputs change from 0 to 3. When the Test Input value returns to 0, both logic block outputs return to 0.


So far, the behavior of these 2 logic blocks is identical. I thought maybe the difference is that Persistent Storage X=mem(A) would retain the value 3 even after the Test Input value returned to 0 but that does not happen. Then I though maybe I have to enable "Save and restore value permanently" but enabling this did not seem to change anything.


Then I thought maybe the Constant is the problem, because it is always 1, so S on the logic blocks is always 1, so X will always equal A. I replaced the Constant block with another Input block.


I set the Test Input duration to 10 seconds and the Control Input to output a 1 for 5 seconds. Initially, the Test Input and the Control Input are 0 and the outputs of both logic blocks is 0. I start Test Input first, which changes to 3. Then I start the Control Input which changes from 0 to 1. When this happens, the logic block S inputs change to 1 and both logic blocks pass the Test Input value 3 to their X outputs. When the Control Input times out and returns to 0 the Test Input is still 3 because I set the Test Input Test data output to 10 seconds. In this case, when the Control Input returns to 0, the logic block X outputs stay at 3 even after the Test Input returns to 0 because the Control Input is now at 0, so the logic block S inputs are 0. The Test Input value of 3 is retained. This makes sense but both logic blocks are still doing the exact same thing.

Can somone explain what the difference is between Memory X=sh(A) and Persistant Storage X=mem(A)? Since the descriptions are identical, they do not explain the difference. In my tests, these 2 logic blocks always do the exact same thing. Also, what does the switch "Save and restore value permanently" do? Enabling it did not seem to do anything in my test.

Donnerstag, 18. April 2024, 01:47

If memory serves, 'persistent' survives a system shutdown

Perhaps the reply is a bit too succinct... what I meant is I believe the 'persistent' variable is stored to permanent memory (i.e. disk drive), and will be available after a system shutdown/restart, while the variable stored to volatile memory will not.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »InfoSeeker« (19. April 2024, 02:01)

Samstag, 20. April 2024, 02:34

If memory serves, 'persistent' survives a system shutdown

Perhaps the reply is a bit too succinct... what I meant is I believe the 'persistent' variable is stored to permanent memory (i.e. disk drive), and will be available after a system shutdown/restart, while the variable stored to volatile memory will not.
That may be correct and I am thinking about a way to test it. That would explain why these 2 logic blocks behave exactly the same in the test I set up. I wish Aquacomputer would document things better. A lot of info in their owner's manuals is incomplete, and some of them still reference products that were discontinued years ago. There are a number of settings, check boxes, and switches that are not documented at all. Usually I can figure out what they do but not always.

Samstag, 20. April 2024, 15:44

Did a quick & dirty test, and the 'persistent' variable does appear to survive a system restart (VID)

Samstag, 20. April 2024, 18:55

Thank you for testing this. I was planning to set up a test this weekend and you have saved me the trouble, although I will probably test it myself anyway. :P

Ähnliche Themen