LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Switch using state machine & automatic array adjustments

Hi all,

 

Hoping some one can help. I few a few questions with regard to what i've done so far. I'm trying to complete a test which will automatically switch between tests. The issue is it depends on the test type.

 

Example if i'm testing my fibre cable which is multimode i only complete an insertion loss test. One after the other.

 

If i'm testing a fibre cable which is singlemode i complete an insertion loss test, then a return loss test.

 

My test kit is essentially running my pc. I need to press a button on the test kit to pump the data to the pc. I have this working fine with one case structure for insertion loss testing only. When i introduce a new case for singlemode return loss it all stops working.

 

I've included the VI i've completed so far. To see what i mean please click on the two most inner cases . One is labeled 1, and 0, default. The other is the next outer labeled true and false.

 

Can someone please tell my why this doesn't swich to the next test?

 

 

Next question, if i'm testing multimode only i need 2x insertion loss for each end of my cable. Therefore if i'm testing sinlgemode for IL and RL i need four results. Can i automatically have the array size adjusting depending on which test i perform at the beginning of my testing procedure?

0 Kudos
Message 1 of 5
(2,668 Views)

HI

Can you please attach VI in LabVIEW 8.5 format.

Regards

Santosh

0 Kudos
Message 2 of 5
(2,649 Views)

Hope this works.

 

 

0 Kudos
Message 3 of 5
(2,645 Views)

Dear Printerman,

 

I studied you program and found the followings:

 

The middle case structure's selector input is connected to a false constant, so your main code in the true case has no effect as it is never executed.

 

Otherwise let us assume that there is a true constant.

 In this case the most inner case structure is going to default as the first input is -1. That means the next state will be the 0 case and then the 1 case and then the 0 case and so on.

 

Anyway your program is basicly pretty well structured, I suggest you redesign the state machine in a way so it could reperesent the type of measurement. It would solve your array size question at once also.

 

If you need help in that feel free to ask!

 

Regards,

Marton

NI Hungary

0 Kudos
Message 4 of 5
(2,643 Views)

Thanks! I think i know what you mean regarding the true flase thing. I'll have a look at that.

 

Regarding the Array and the state machine. Do you mean to inlcude the array struncture inside the SM/MM case structure? I think you do, which means the array size is determined but the test being done, rather than trying to define it elsewhere.

 

Thanks!

0 Kudos
Message 5 of 5
(2,627 Views)