LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Action engine cluster loses data

Solved!
Go to solution

I have a strange problem that I am working on.  When my AE executes a certain method, the data that I am trying to package into the cluster is lost.  I use this design pattern for all my AE designs but have never seen this issue before.

 

When the waveform is converted to an array of DBL, the cluster does not update with the data.  Any ideas why?

0 Kudos
Message 1 of 19
(3,598 Views)

Try initializing the arry to the required size with zeros in the "initialization state"

 

 

 

Message Edited by vt92 on 09-23-2009 02:27 PM
>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 19
(3,584 Views)

This will make it work correctly.   

 

array.PNG

 

This is probably not the most memory efficient method.

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 3 of 19
(3,578 Views)

vt92--

 

Thank you for your replies.  I still wonder, mostly from a philosophical standpoint, why an array comes out of the "~|Y" VI and doesn't propogate to the cluster.  In the kc64 case, the "~|Y" VI produces an array with 500 elements and, in the vt92 case, the code still produces an array with 500 elements.  It seems like it should work.  I think I will have to use it without understanding it for the time being.

 

Thanks,

kc64

0 Kudos
Message 4 of 19
(3,562 Views)

kc64 wrote:

I have a strange problem that I am working on.  When my AE executes a certain method, the data that I am trying to package into the cluster is lost.  I use this design pattern for all my AE designs but have never seen this issue before.

 

When the waveform is converted to an array of DBL, the cluster does not update with the data.  Any ideas why?


What you have isn't really an action engine - it's basically just a state machine. That said, I can't replicate what you're seeing. Can you provide the exact steps you're doing?

 

As far as the suggestions provided - they're pointless. Initializing an array of 500 points and then using Insert Into Array makes no sense to me either. 

0 Kudos
Message 5 of 19
(3,554 Views)

Thanks for your reply.  I often find myself calling both an SM and an AE as AE as long as it uses some USR.

 

I am running LV 8.5.1 and it happens repeatably.  Run the code in execution highlighting and watch the Output AE port after completion of the Get Waveform Datapoints method.  You should see #500 on the output of the "~|Y" VI.  When it gets back to the USR, the data is gone.

0 Kudos
Message 6 of 19
(3,551 Views)

kc64 wrote:
When it gets back to the USR, the data is gone.

I assume you meant to add "when you run the VI a second time", since the VI will stop after execution of that state. Unfortunately, I don't have 8.5.1, so I tried your code in 8.2 and LV 2009 and it behaved correctly. In other words, when running the VI a second time, a probe placed on the left side on the wire going from the left shift register and into the case structure indicated the value of the shift register was still there. 

0 Kudos
Message 7 of 19
(3,540 Views)
Deleted double post ... server hick-up.
Message Edited by smercurio_fc on 09-23-2009 04:21 PM
0 Kudos
Message 8 of 19
(3,540 Views)

I could replicate his issue and my suggestion did work on my machine running LabVIEW 8.6.  I'm not saying is the best way, but it may be a clue as to what is going on.

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 9 of 19
(3,536 Views)

I have experimented with this for several hours with no root cause identified.  I tried to remove the waveform object from the type def in the initialization state and it crashed LV--repeatedly.  So, I left it out.  Now the code runs fine.  I still don't know what I was dealing with.  Thanks to all of you who generously offered to help.

 

See the modified code attached.

0 Kudos
Message 10 of 19
(3,532 Views)