LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert a normal number to binary?

Ok thanks. I am facinated by some of the building blocks you whip out! Split number is great for 2 bit hex numbers!
 
I am going the run this code 4 times a second. so I am going to wind up rolling over the BLK cnt. (It only goes to FF, or 255) So my code only works for 63 seconds. What is the proper way to increment up the block count by one for every message and then most importantly roll it back to 0 once it reaches 255?
0 Kudos
Message 31 of 129
(1,240 Views)
A U8 shift register will work.
0 Kudos
Message 32 of 129
(1,236 Views)

Ok, I was wondering what the behavoir of the U8 input would be once it reached 255. Thanks.

Let me see if I can crank this out.

 

0 Kudos
Message 33 of 129
(1,233 Views)
You don' even need a shift register. If you convert the iteration terminal to U8, it will basically take a "logical AND with 0xFF", so you'll get the desired behavior anyway.
 
(Actually, all you need is a U8 indicator to coerce, but in your case you need the "to-U8" for further processing of the value).

Message Edited by altenbach on 07-31-2007 08:08 AM

Download All
0 Kudos
Message 34 of 129
(1,217 Views)

So how do i get these buttons to work? Obvoiously when the button is pressed it shoudl send the hex value i have placed in the true frame, if the value is false it should send 10 "reference speed value. This will allow the controller to run seamlessly when you dont want anything changed while the loop continues to run and collect data.

I might change "10" to "63" which is the request for measure values from the controller.

 

Message Edited by Vr6Fidelity on 07-31-2007 10:09 AM

Message Edited by Vr6Fidelity on 07-31-2007 10:16 AM

0 Kudos
Message 35 of 129
(1,216 Views)

a "bit" further along

 

 

0 Kudos
Message 36 of 129
(1,209 Views)

You cannot have a wire with multiple data sources. Think about it!

Well, I assume that you don't need to send the same command over and over again, but only send when things change. I would use an event structure and use latch action on the booleans.

Here's a quick draft. Maybe it will give you some ideas.

 

0 Kudos
Message 37 of 129
(1,202 Views)

I dont even know how that works! It is impressive looking though!

event structure? never heard of it.

I do like the nifty multiple pushbutton thing though. where did that come from?

I actually DO want to send code 63  4 times a second. It tells the controller to send me information that I am collecting.

 

 

0 Kudos
Message 38 of 129
(1,197 Views)
Them add a 250ms timeout and send 0x63 in case of a timeout. Mix & match. 🙂
0 Kudos
Message 39 of 129
(1,194 Views)

I look at what you did, and i dont understand.

you are way above my level.

0 Kudos
Message 40 of 129
(1,193 Views)