LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

State Machine - Sending spreadsheet string to new state without shift register

Solved!
Go to solution

Hey all - fairly new to LabVIEW and I am having issues getting what I need done. I have a state machine acquiring either 1 or 2 channels of data depending on user input, then adding a third column for time. The thing is, the user needs the option of choosing whether to actually save that data or not, so the saving process is in another state depending on if they select yes or no. 

 

My issue is that I need this spreadsheet string to be sent to another state after it has left the data acquisition state. I understand shift registers are the way to go for this but I'm at a loss on how to do that. For now I will only post an image of the area in focus. My code is also very messy right now so please overlook that - I haven't begun to clean anything up until I get everything sorted. I would use a shift register but my meager attempts to do that have failed. There's alot going on with this at the moment so I have been trying to avoid that.

 

TL;DR: Spreadsheet string is in case 5 of my state machine. I need to then send that string to case 8 for the saving process. After leaving case 5 the spreadsheet reinitialized to empty. Ideally, the string retains the data and then I can use a property node or reference to pull from it.

 

Much appreciated.

 

 

Case 5

rashelton42_0-1619386205158.png

 

Case 8

rashelton42_1-1619386292780.png

 

 

 

0 Kudos
Message 1 of 3
(813 Views)

@rashelton42 wrote:

I understand shift registers are the way to go for this but I'm at a loss on how to do that.


Well, then learn how to use a shift register because "it's the way to go!". What particular problem did you encounter that left you at a loss?

 

(And yes, as you already know, your code is somewhat a mess and probably has 80% too much code for what it does)

Message 2 of 3
(796 Views)
Solution
Accepted by topic author rashelton42

You certainly are right. I just recently learned about references so I will be going back through at the end and cleaning up that way - on top of the tremendous amount of organizing I will be doing as well.

 

I got stuck at a loss because my (limited) understanding of shift registers is that they are for iteratively adding to, in this case, a 2D array -- in my eyes, I really only want to take the total array as shown in the indicator at the end of the acquisition process. This argument could be redundant but it leaves me confused on the connections of the shift register to what I currently have. My attempt was connecting the final string to the right side of the shift register and leaving no connection on the left side but I could not get anything that way.

 

Thank you for not being too harsh on the mess and I know all of this can be reduced significantly but I'm doing what I can with the knowledge I have so far (and learning more along the way!).

0 Kudos
Message 3 of 3
(786 Views)