LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

States machine:: how to find number of transitions:

Solved!
Go to solution

Hi member

I have this states machine show below

where x :input and y output where both stream of ones and zeros bit

I ask how can I calculate the numbers of transitions between s1 to s1, s1 to s2, s2 to s1, s2 to s3 and until s6 to s6 , s6 to s5, and so on

 

any chanage in lv I will gracfull

thank in advace

 lvsta.png

hi ?Q>

0 Kudos
Message 1 of 15
(3,601 Views)

i can not uplaod the VI due to the follwing message

""the contents of the attachment doesn't match its file type""".

hi ?Q>

0 Kudos
Message 2 of 15
(3,599 Views)

I would store the counts in an array, one number for each possible transition.  Since you know where you are going next, you increment the element corresponding to that transition.

 


@mangood wrote:

i can not uplaod the VI due to the follwing message

""the contents of the attachment doesn't match its file type""".


Known problem with the forums.  I just zip up the VIs and post the zip file.  Haven't had problems with that yet.


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
Message 3 of 15
(3,594 Views)

What he said. Easiest way is a 2D array where index(x,y) represents the number of transitions from state x to state y.

 

Initialise all elements to zero, index by initial,final state, and increment.

Message 4 of 15
(3,570 Views)


thank for repaly

can plase show me the LV VI so that the index(x,y) represents the number of transitions from state x to state y.

hi ?Q>

0 Kudos
Message 5 of 15
(3,548 Views)

the LV Vi

hi ?Q>

0 Kudos
Message 6 of 15
(3,547 Views)

Dear

 I have done making labview for increasing by one for each transition but how can I produce the following code m(x0 new,y0 new)=m(x0 old,y0 old)+1

i mean how i make change to original array.

lvsta.png

hi ?Q>

0 Kudos
Message 7 of 15
(3,527 Views)

You could change the original array by creating a property node linked to its value and connecting it where your arrow is.

Message 8 of 15
(3,520 Views)

@ToeCutter wrote:

You could change the original array by creating a property node linked to its value and connecting it where your arrow is.


is thier any example please for doing that please its complex for me

hi ?Q>

0 Kudos
Message 9 of 15
(3,517 Views)
Solution
Accepted by topic author mangood

Dude, it's not complex to read the LabVIEW help on property nodes.

 

Right click on your 'm' value on the diagram, select 'create->property node', right click it and select 'change to write', and use the little hand tool to select the property 'value' on it. Then wire it to the output of your right hand block.

Message 10 of 15
(3,511 Views)