From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-07-2018 01:01 PM
@RTSLVU wrote:
Prime example of why "Express VIs" shouldn't even be there and "Dynamic Data" should be introduced at a much higher level.
No, DDT should not even exist!
09-07-2018 01:05 PM
@altenbach wrote:
wiebe@CARYA I don't think you need the "=0" because it inits unconditionally on first call anyway.
Might be required in situations like when this VI gets called from within multiple/different VIs across the project that is being executed from TestStand. First Call would be valid only when it gets called from TS for the very first time, unlike when it is getting called from different VIs when executed from LV!
09-07-2018 01:28 PM
@crossrulz wrote:
@RTSLVU wrote:
Prime example of why "Express VIs" shouldn't even be there and "Dynamic Data" should be introduced at a much higher level.
No, DDT should not even exist!
Agreed.
Actually for me it basically does not exist, as I have never found a use for it.
09-07-2018 02:28 PM
@parthabe wrote:
First Call would be valid only when it gets called from TS for the very first time, unlike when it is getting called from different VIs when executed from LV!
When called from different VIs, each instance has it's own initialization whenever it is called for the first time because most (if not all) ptbypt VIs are fully reentrant. Sorry, I don't know anything about teststand and how that deals with ptbypt VIs.
09-07-2018 03:20 PM
@JÞB wrote:
@Jacobson-ni wrote:
....
I also strongly dislike dynamic data because what even is the expected output of a double casted to dynamic data then casted to a boolean array.
My office is temporarily offline for movies but, aren't the block diagrams unlocked. WARNING: some content my offend some viewers. Discretion is advised.
Sure, but for the most part you just make everything a waveform and then have a subVI that looks way to much like a primitive that converts the waveform to dynamic data which is just a subVI with waveform input connected to DDT output.
09-07-2018 05:44 PM
@altenbach wrote:
@parthabe wrote:
First Call would be valid only when it gets called from TS for the very first time, unlike when it is getting called from different VIs when executed from LV!When called from different VIs, each instance has it's own initialization whenever it is called for the first time because most (if not all) ptbypt VIs are fully reentrant. Sorry, I don't know anything about teststand and how that deals with ptbypt VIs.
It might be an interesting exercise for TestStand training to:
A. Create a vi with First call wired to an indicator.
B Copy that vi and make it reenterant.
C. Add both to the lvproj you created before step A
Open Teststand and call the 2 vis as pass fail tests repeatedly changing the load unload options and context (calling through the project context or the default TSproxy caller)
The steps will pass on only specific conditions. The non reenterant vi should output true when first loaded in each context and after any time that context's copy has been unloaded for each execution socket.
The reenterant vi output should also depend on the above, shared/pre allocated setting, and if it has been inlined into a calling vi.
Using the vi hierarchy view from teststand showing the proxy callers will help visualize the reasoning for the outcomes.
Sounds like a great white paper for someone to write.
09-10-2018 02:23 AM - edited 09-10-2018 02:46 AM
I didn't get any useful time of that code improvement before I changed it to this:
09-10-2018 02:26 AM
@altenbach wrote:
I don't think you need the "=0" because it inits unconditionally on first call anyway. You also need to wire the time to the initial condition, else you get garbage values for the first two iterations.
What if the VI is called multiple times? Surely you don't want the dT between the first new iteration and the last time it run?
Pretty much agree on all the other things. If the PtByPt was a .vim, the to dbl conversion wouldn't be needed. Obviously we count on NI to keep those (all) VIs as lean and mean as possible (/S).
09-10-2018 03:03 AM - edited 09-10-2018 03:04 AM
wiebe@CARYA wrote:
@altenbach wrote:
I don't think you need the "=0" because it inits unconditionally on first call anyway. You also need to wire the time to the initial condition, else you get garbage values for the first two iterations.What if the VI is called multiple times? Surely you don't want the dT between the first new iteration and the last time it run?
As already mentioned by Partha. Never mind. Monday morning...
09-10-2018 03:06 AM
@altenbach wrote:
@parthabe wrote:
First Call would be valid only when it gets called from TS for the very first time, unlike when it is getting called from different VIs when executed from LV!When called from different VIs, each instance has it's own initialization whenever it is called for the first time because most (if not all) ptbypt VIs are fully reentrant. Sorry, I don't know anything about teststand and how that deals with ptbypt VIs.
But even when it's called multiple times from the same VI, I would expect the dT to be 0 for the first iteration of that call. Not in all use cases, but definitely in some.