LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

questions about shift register

Solved!
Go to solution

Wait a minute, try this.

 

CompareArray.png

-----

The best solution is the one you find it by yourself
Message 11 of 20
(788 Views)

Why did i forget to mention that ..........

0 Kudos
Message 12 of 20
(783 Views)

hohohihijj.JPG

I think you dont need shift register. Try this code =))

Đặng Huy Hoàng
0 Kudos
Message 13 of 20
(766 Views)

@Hohohihijj wrote:

hohohihijj.JPG

I think you dont need shift register. Try this code =))


One caveat about your code is that it's a little dangerous to be comparing doubles like that.  By their very nature they are imprecise, and that imprecision could lead to a bad comparison.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 14 of 20
(726 Views)

@billko wrote:

@Hohohihijj wrote:

 

I think you dont need shift register. Try this code =))


One caveat about your code is that it's a little dangerous to be comparing doubles like that.  By their very nature they are imprecise, and that imprecision could lead to a bad comparison.


Not to mention you don't even need a loop!  Panand's solution is by far the simplest.


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 15 of 20
(718 Views)

True, Panad solution is best for this case.

But i think OP has misunderstanding about loops and shift registers also.

I would recammond LabVIEW basic courses for that.

0 Kudos
Message 16 of 20
(713 Views)

@crossrulz wrote:

@billko wrote:

@Hohohihijj wrote:

 

I think you dont need shift register. Try this code =))


One caveat about your code is that it's a little dangerous to be comparing doubles like that.  By their very nature they are imprecise, and that imprecision could lead to a bad comparison.


Not to mention you don't even need a loop!  Panand's solution is by far the simplest.


Of course - but the code works and I wanted to emphasize the more important issue.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 17 of 20
(696 Views)

@billko wrote:

Of course - but the code works and I wanted to emphasize the more important issue.  🙂


You pointed out correctly. That is one of the ameture's mistake, I have seen few in very critial places.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 18 of 20
(690 Views)

billko wrote:

Of course - but the code works and I wanted to emphasize the more important issue.  🙂


But a Less Than for a floating point isn't really the dangerous one.  It is the Equal To.


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 19 of 20
(685 Views)

@crossrulz wrote:

billko wrote:

Of course - but the code works and I wanted to emphasize the more important issue.  🙂


But a Less Than for a floating point isn't really the dangerous one.  It is the Equal To.


You're right.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 20 of 20
(682 Views)