LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with sequential testing

Hello,

 

I am trying to create a test that uses Labview to interface with an arduino that turns on and off relays. The example code I have included is what i want it to do, but it uses a lot of local variables. I was wondering if someone has a better idea on what to do. If possible I would like to be able to reset all of the indicators and controls back to default state at the beginning of a test (I wasn't able to figure out how to do that). 

 

(I am just using constants to prove my point so I didn't put the Arduino (LINX) sub vi's in the code)

 

Thanks.

0 Kudos
Message 1 of 8
(2,918 Views)

I can't look at your code, but what you described indicates that you need to learn to use shift registers to hold your current state.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(2,879 Views)

I wonder why you cant see the code. Anyway the way I have it set up I cant use shift registers because the controls are not the same for each state. Or maybe there is but I am not seeing it. I'll reattach the code maybe it will work this time.

0 Kudos
Message 3 of 8
(2,856 Views)

@Collin.Fischels wrote:

I wonder why you cant see the code.


The reason what that I was on my phone at the time.

 

Now that I reread everything here 5 times, I'm pretty sure what you really need to do is implement a State Machine.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 8
(2,843 Views)

I can seen your code, I guess now I can't unsee it...

 

There is no loop? Don't tell me you run this by using the Continuous Run button!

 

Here is a couple resources to get you started

https://www.ni.com/getting-started/labview-basics/

http://www.ni.com/getting-started/labview-basics/dataflow

https://www.labviewmakerhub.com/doku.php?id=learn:tutorials:labview:basics

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 8
(2,833 Views)

No I am not using the continuous run button. I know the basics of Labview.

0 Kudos
Message 6 of 8
(2,830 Views)

@Collin.Fischels wrote:

No I am not using the continuous run button. I know the basics of Labview.

Sorry, when I see such heavy use of flat sequences my first instinct is to direct people to review LabVIEW basics .

 

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 8
(2,826 Views)

Problem is I have tried to do this with a state machine and I am unable to get it to work like how I have it with the sequences. Trust me I don't want to use the sequences just cant seem to get the case structures and event structures to do what I want. 

0 Kudos
Message 8 of 8
(2,822 Views)