From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Buffer Overload Issue -200279

Solved!
Go to solution

Hey,

 

I think I'm getting somewhere with the new setup. I removed the "recording process" out of the state machine and am now triggering the data collection with a queued message handler.

 

The -200279 error is gone, but I was hoping for any last tips in the new V006 code (saved to 2017) before I mark this one resolved?

 

I'm still going to get ride of the locals too. 

 

Thanks a bunch.

0 Kudos
Message 11 of 18
(1,029 Views)

I would get this working as a state machine first. The message handler can come later. You do not need the inner loop if you properly set up your state machine. Your state machine might have an initialize state, a waiting state, a start acquisition state, and acquiring state, a stop acquisition state, and a shutdown state, for example. Pass the task and error wires through all of the states via shift registers (make sure you wire them through all states). 

 

Edited to add: I started writing this reply before seeing your last response.

0 Kudos
Message 12 of 18
(1,024 Views)
Solution
Accepted by topic author jescameron

You're off to the wrong start. Take a step back and get the state machine running first. You're QMH will not run as written. LabVIEW is a dataflow driven language. This means that a node (loop, etc) can't run until all of it's inputs are available. Also, an output won't be available from a node (loop) until the node (loop) has fully completed.

Message 13 of 18
(1,019 Views)

So, I've been working to switch things over to a state machine, but I'm running into a few concerns.

 

1. I seem to have a lot of shift registers and I'm not confident in how their being used or how I am initializing. For example, when I close a daq task doesn't the shift register disappear at that point?

 

2. I'm not sure the best way to shut down the code. Before I would just use a boolean and attach it into the while loop, but now I'm not sure. 

 

3. There seems to be a lot of code in the state machine compared to all the examples I can find, is this wrong?

See V008 for reference. 

 

0 Kudos
Message 14 of 18
(1,006 Views)

@jescameron wrote:

So, I've been working to switch things over to a state machine, but I'm running into a few concerns.

 

1. I seem to have a lot of shift registers and I'm not confident in how their being used or how I am initializing. For example, when I close a daq task doesn't the shift register disappear at that point?

 

You can reduce the number of shift registers by bundling some of the information and using bundle by name/unbundle by name to get to the information that you need. 

 

Open the DAQ task at startup and don't close the task until shutdown. This way the task remains valid. You can start and stop the task without issue.

 


@jescameron wrote:

 

 

2. I'm not sure the best way to shut down the code. Before I would just use a boolean and attach it into the while loop, but now I'm not sure. 

 


Do the shutdown in your Wait for Event loop. One way to do this would be to have two shift registers for your Next state - one would always be Wait on Event and the other would be the next state. Go to the Wait on Event after every state. Use a small timeout to check for events. If timeout then go to the next prescribed state. If an event occurred (stop button pressed, for example) then the timeout code will be ignored and it will go to the stop state (or whatever state you tell it to go to).

 


@jescameron wrote:

So, I've been working to switch things over to a state machine, but I'm running into a few concerns.

 

3. There seems to be a lot of code in the state machine compared to all the examples I can find, is this wrong?

See V008 for reference. 

 


You really don't have that much code in there - it just needs to be cleaned up a bit.

Message 15 of 18
(1,001 Views)

I lowered the number of items by bundling, but I have no idea why these controls are not initializing. Do you have any ideas? 

See V010. 

 

 

0 Kudos
Message 16 of 18
(991 Views)
Solution
Accepted by topic author jescameron

Here is what I see in your "Configurate" state.  (PS.  "Configurate" is not a word.  It should be "Configure".)

 

(EDIT:  Same problem in your Start Acquisition state.)

 

When you bundle new values into your cluster, you are using the empty cluster constant from outside the while loop and not the cluster wire from your shift register.

 

 

Red = bad.  Green = good.

Message 17 of 18
(986 Views)

Thanks for both your help with the code. 

 

In the end things are working much better in a state machine and correctly wired bundling. 

0 Kudos
Message 18 of 18
(967 Views)