Go to Post Obviously, really large issues need to be addressed, and if you feel there is a huge problem, by all means, go ahead, if you can be polite, productive, and graciously professional, address it. - Amanda Aldridge [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 27-09-2008, 14:06
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: help with another VI

Setting divisions to 360, I think I was able to get it working the way you want by making the following changes.

Use Atan2.

Drop the conditional amount you are adding, and add div/2 all the time. Let Atan2 do this for you.

Multiply by (div/2)/ pi. Or make sure your units are correct. They seemed to be off by 2x.

The other changes shown in the picture are just to show some other ways of doing things.

You can do math on arrays and clusters. In many cases such, this allows you to have fewer wires and think in terms of points, rects, etc. I added a picture control to hover over to quickly get an easy to control input to the code.

I didn't use your pythag VI simply because I didn't have it. I deleted the file stuff to clarify the code.

Also, you can of course use integers if you like, but they are much more error prone, and in many cases aren't any faster. Similarly, using file I/O to load values rather than compute them will likely be hundreds or thousands of times slower than computing it.

Hope this helps.

http://www.chiefdelphi.com/forums/images/attach/png.gif
Attached Thumbnails
Click image for larger version

Name:	AngleDist.png
Views:	78
Size:	12.0 KB
ID:	6846  
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fluent in another language? Your help is needed! Knippschild General Forum 55 18-02-2007 18:34
Ultrasonic will not work with another Ultrasonic plz help Jackel148 Programming 10 10-05-2006 15:31
Help Genia Get Taller and Win Another Prize Eugenia Gabrielov Chit-Chat 41 24-02-2005 10:42
Need interupts help, and another question... Kevin Karan Programming 7 22-02-2004 11:20
Help out, another question archiver 2001 1 24-06-2002 01:01


All times are GMT -5. The time now is 19:23.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi