LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

passing error wire - connected to an undirected tunnel

How can I pass error cluster wire between stacked sequences ??

 For example in the state machine -  the error cluster wires should pass data from previous stacked sequence CASE 0 to CASE 1.

 

How can I do that ? 

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 1 of 14
(5,606 Views)
Use an actual state machine. A stacked sequence structure has no place in LabVIEW programs anymore. Learn how shift registers work.
0 Kudos
Message 2 of 14
(5,600 Views)

I have searched many times on this forum.

 

How can one do the following in terms of state machine :

 

  1. Have a FOR loop that has N cases
  2. For each iteration "I" the cases 1-N repeat.

One way is to convert those 1-N cases to another state machine and reuse it under the main state machine (for example the one I showed).

 

How else could one do it., Please explain this. As this is most common kind of coding I will have to face through out my development and I dont want to complicate it by having nested state machines.

 

Even a simple sketch will do it.

 

Thank you.

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 3 of 14
(5,587 Views)

Consider creating a subVI of each frame and wire them sequentially. This might be much easier to read than a stacked sequence.

If you really want to keep the stacked sequence you could pass errors via Sequence Locals between frames but I would not recommend this.

 

0 Kudos
Message 4 of 14
(5,586 Views)

So what you mean to tell is create sub VI  for each frame of the CASE structer and connect them sequentially inside the FOR LOOP .

 

Am I understanding what you said in the correct way.

 

What if I want to give something very simple like WAIT(ms) between the first and second SUB VI. How can I connect them through with out a flat sequence ?

 

 

 

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 5 of 14
(5,577 Views)

That's what I thought. It seems a little bit overkill to me to replace a stacked sequence with just 2 frames by a state machine, I think subVIs are better suited here.

 

Regarding your second question: You need a flat sequence here. Place it on the error wire between the subVIs and put the Wait primitive into it.

0 Kudos
Message 6 of 14
(5,571 Views)

How about the question I asked about introducing a wait(ms) in between the two sub VI. How could I do that then ... 

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 7 of 14
(5,569 Views)

Sorry, I read your second question too late and decided to edit my original post. You find the answer there 🙂

0 Kudos
Message 8 of 14
(5,564 Views)

How about like this ?? 

 

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 9 of 14
(5,561 Views)

Looks OK to me. If you need the Wait in the error case frequently in your project this would be a good candidate for a subVI, too.

0 Kudos
Message 10 of 14
(5,540 Views)