LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Binary pattern detector using state machine

I'd like to enter 0's & 1's one at a time (manually). An alternate solution is fine, but the point of this exercise is to learn how to create State Machines in LabVIEW. As I'm on the Mac platform, I'm trying to do this without the aid of the State Chart Module or the State Diagram toolkit.

Thanks,
Michael
0 Kudos
Message 11 of 17
(1,189 Views)
Simon,

Sorry for getting back so late. I'm having a problem seeing some of the PDF file. Could you zoom out a bit?

Thanks,
Michael
0 Kudos
Message 12 of 17
(1,185 Views)
Dr. Reynolds,
 
I'm guessing you had trouble reading the text at the top, see the landscape attachment below.  Labview is not very smart when it comes to Adobe print outputs.  -SS 


0 Kudos
Message 13 of 17
(1,173 Views)
Thank you very much 🙂 I guess we can't expect LV to be smart about everything. LOL.
0 Kudos
Message 14 of 17
(1,169 Views)

Dr. Reynolds,

How will you be determining when to latch your input?  Are you polling it?  -SS



0 Kudos
Message 15 of 17
(1,156 Views)
Simon,

Good question. I know that the basic operation of this pattern detector is supposed to be:

1. user inputs 0 or 1 multiple times
2. when the sequence 011 has been input, the machine will output a 1 and continue looking for the pattern
3. the machine stops when a STOP is issued (from the front panel)

There is to be no preset number of bits meaning that the user should be able to enter 100 or 1000 or even 10 0's and 1's without any machine hiccups. I've looked at the Coke Machine example and I want similar functionality, i.e. when it runs continuously, the user can keep entering 0's and 1's and the detector will keep looking for the pattern. I don't know how they do it, whether by latching or polling.

On another note, I have a question for you. While I'm no veteran at LV, I have done enough with it to not feel like a complete newbie. That being said, however, I'm having trouble figuring out what's what in your VI. Many of your components are not viewed as icons so I don't really know what they are. I also see a connection from the shift register (top left corner, and the one right below it) to what looks like a block from the Array palette but the symbol isn't clear to me. Could you help me there? I also wanted to know the purpose of the 500 ms timer.

Thanks again for you assistance.

Michael
0 Kudos
Message 16 of 17
(1,150 Views)
 
 

I think you are talking about this example.  I would recommend looking at the various event examples.  Do you want to input one's and zero's on the keyboard or use the mouse to push buttons?

The shift registers are used to hold the various variables and/or array types.  Several of the arrays are there just to keep track of things as they play out.  The 500ms timer is there so you can see things working:)  The *vi doesn't except input it just shifts through the pattern you provided previously.

 

 



Message Edited by ShotSimon on 07-22-2008 03:53 PM



0 Kudos
Message 17 of 17
(1,129 Views)