LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

New NXT-G block, need some help

Sorry, forgot the attachment:
Download All
0 Kudos
Message 21 of 28
(4,708 Views)

Hi MindstormsKid,

why do you want to display 97? I thought you have 0 to 100 as input and you want 0 to 850 as output! Isn´t it correct? How do you get the 697?

Don´t use the divide function. As i said before, calculate only with integers and if you want to display something you can use the string subset function, to get only a part of it.

Mike



Message Edited by MikeS81 on 07-18-2008 09:31 AM
0 Kudos
Message 22 of 28
(4,705 Views)
No, I wanted it to take the number of degrees the motor spins every 100ms, and put out a numeric value from 0 to 100. There is a motor power block that tells how much power the motor is getting, but no block that tells how fast the motors are turning.
0 Kudos
Message 23 of 28
(4,700 Views)
Hi MindstormsKid,
what about this solution? You read the current degree value and store it in a shift register, so you can calculate the difference between the last and the actual position.

Hope it helps.
Mike
0 Kudos
Message 24 of 28
(4,690 Views)
Sorry for the delay, I'm still testing it. There might be a problem...
0 Kudos
Message 25 of 28
(4,661 Views)
Hi MindstromsKid,
can you explain your problem, please?
Mike
0 Kudos
Message 26 of 28
(4,658 Views)
Mike, sorry about the delay. I've started building a new robot that's taking all my time. I'll continue testing when I'm done with it.
0 Kudos
Message 27 of 28
(4,584 Views)

Sorry about the long wait, Mike, but I've been very busy 😞

 

I think the problem was that I had been changing your code a little bit, but I changed it back so now it works fine. One question... How does it (the new one) work? Even if I hold the motor still or at around 50% power, it still says "0" or "50". Thanks.

0 Kudos
Message 28 of 28
(4,313 Views)