Search code examples
timelabviewmultisim

Saving the simulation time of an event within a Control and Simulation Loop


I've got a Control & Simulation Loop structure in LabVIEW that is sending inputs to and receiving outputs from a Multisim model. I'd like to measure the simulation time difference between when two boolean outputs from the Multisim model go to true. I'm able to add a Control & Simulation -> Simulation -> Utilities -> Simulation Time widget and wire that up to an indicator on my front panel, and see the simulation time progressing as I run it, but I can't find a way to latch that double-precision numerical value into a storage location for later comparison without using a loop structure that isn't allowed within a Control & Simulation Loop structure. Am I missing something straightforward?


Solution

  • The function you're looking to use is called "Memory" and is located in the Simulation Utilities Functions palette. Memory does the following,

    "Stores the value of the Input signal from the previous iteration of the simulation. Use this polymorphic function to transfer values from one iteration of the Control & Simulation Loop to the next. The data type you wire to the Initial Value input determines the polymorphic instance to use." - https://zone.ni.com/reference/en-XX/help/371894H-01/lvsim/sim_memory/