01-31-2011 12:24 AM
Hi Pallavi:)
In the block-diagram, right-click your double. Then select Properties. Then navigate to display format as shown on the picture.. Here you can select how man digits you want after comma.
01-31-2011 01:04 AM
thanks for replying even..
What you've suggested only changes the display format for that particular indicator but does not round off the number itself.
01-31-2011 01:07 AM
Palchen wrote:@altenbach : Is there a way to control which local variable gets updated first?
Eliminate at least one of the locals. Writing to the same local from different places, even of you know the order, makes little sense overall. Right?
01-31-2011 01:09 AM
Palchen wrote:What you've suggested only changes the display format for that particular indicator but does not round off the number itself.
Computers operate in binary, and a lof ot exact decimal fractions cannot be fully represented in binary (e.g. 0.1).
What you could do is multiply by 100, round to the nearest integer, then divide again by 100, for example.
01-31-2011 01:22 AM
Hi Palchen,
Here is the vi's in 8.5.
Hope it helps.
Rgs,
Lucither
01-31-2011 09:41 AM
thank u all..i'll try out the suggestions and update ..
01-31-2011 11:53 AM
Pallavi,
From the numbers you provided I think you will have some difficulty meeting the requirements directly.
A Bourns 3540 wirewound 10-turn pot has a resolution of 0.019% or about 2 parts in 10000. To get 1 mm resolution in 10 m, you need 1 part in 10000. If the pot has a cermet or conductive plastic element, then you may be OK, because those types have essentially infinite resolution.
At 15 seconds to move 1 m it will take 15 ms to move 1 mm. That means that to control directly you need to make the voltage measurements, do the filtering, make a decision, write the stop command to the motor, and allow the motor to coast to a stop all within 15 ms. If you are using a desktop operating system, the OS latencies alone could be larger than 15 ms, at least occasionally. Unless you are using a very high performance motor and driver, the motor will not stop within 15 ms of receiving a command.
Please take a look at your overall system and at the specifications to see if you are being realistic.
Lynn