Go to Post If you never reach out and experiment with different things, you will never have the courage to reach out again. It's only through experiments and experiences where we get to understand ourselves better. - Ken Leung [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-02-2009, 23:04
dpeterson3 dpeterson3 is offline
Registered User
FRC #1178 (DURT)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2008
Location: St. Louis
Posts: 158
dpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the rough
C++ in LabView

I don't really like LabView, but it is the only thing that seems to be working on our bot. WindRiver just does not work. Besides, the rest of the team is using LabView. Someone said that we could code C++ in LabView, but I have no clue how to do it. There are a few problems we are having with the labview software that I could fix in a heartbeat in C++. Anyone know how to open a C++ editor in LabView.
  #2   Spotlight this post!  
Unread 17-02-2009, 01:17
whitetiger0990's Avatar
whitetiger0990 whitetiger0990 is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Earth
Posts: 157
whitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of light
Re: C++ in LabView

Nope, I'm afraid your someone is mistaken. While formula nodes can do formulas and math like C, you cannot do what your asking. Try looking up Formula Nodes and seeing if they can do what you want.
__________________
print$q=chr(ord($q)+$1)while("7443-0201-8465130105-12-03135-82482113-06-7672-070208-0613-70"=~/(-?\d\d)/g);
  #3   Spotlight this post!  
Unread 17-02-2009, 01:23
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
Re: C++ in LabView

you can do library calls to DLL's compiled in c++, but i dont think thats actually what you want to do.
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY
  #4   Spotlight this post!  
Unread 17-02-2009, 08:48
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,751
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: C++ in LabView

Quote:
... we are having with the labview software that I could fix in a heartbeat in C++. Anyone know how to open a C++ editor in LabView.
If you describe what it is, I suspect it won't more than 2 heartbeats in LV either. As for doing C++ code, keep in mind that LV is compiled directly to machine code. There is no C++ generation in between, and no translator. It is possible for LV to call into .out binary files, and there are white papers that describe it, but it is not for the faint of heart. The topic would be Calling External Libraries from LabVIEW.

Greg McKaskle
  #5   Spotlight this post!  
Unread 17-02-2009, 09:49
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: C++ in LabView

Quote:
Originally Posted by dpeterson3 View Post
WindRiver just does not work.
This is sad -- sad because it's so not true.
Still, from reading these forums, I gather that this is the prevalent opinion.

Wind River is getting a completely undeserved black eye for their sponsorship.
This is largely a result of very poor documentation supplied to the teams.
I have to wonder if they'll even bother with FIRST next year.

The other day, I saw a thread in which someone proclaimed that they 'hated' Labview. The poster was cautioned that this might lead to unspecified fallout from NI. I really doubt it.
  #6   Spotlight this post!  
Unread 17-02-2009, 18:16
dpeterson3 dpeterson3 is offline
Registered User
FRC #1178 (DURT)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2008
Location: St. Louis
Posts: 158
dpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the rough
Re: C++ in LabView

Thanks. Just realized why WindRiver is not working. I forgot to add the while loop to make it execute every time. That would be a problem.
  #7   Spotlight this post!  
Unread 17-02-2009, 19:14
XXShadowXX's Avatar
XXShadowXX XXShadowXX is offline
They call me Cody.
no team (None currently :\)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pontiac; MI
Posts: 408
XXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud of
Re: C++ in LabView

there is "C" in labview, its more like a type of pseudo"c";

an if looks like

Code:
if(b==1)
z=2;
else if(b==2)
z=3;
else
z=4;
That is your standard syntax, you have to press enter between logic test and result, but since the formula node is made for math you can do stuff like.

Code:
if((B*A)>a>(B*D))
z=1;

if(B>a)
z=(15=c);
Thats perfectly okay.
oh and you declare variables

Code:
int32 x;
int (bit count, 32/16/8 variable), character (English letter, caps matter);

yes thats it, no boolean, no 4 bits, not 64 bits..

Your switches look something like this

Code:
switch (x) 
{

case 1:
break;

case 2:
break;

case 3:
break;

case n;
break
}
It is nice for some hardcore decision making that would force you to use a couple dozen triangles in Labview, it is also useful for compacting math script. Just make sure you syntax is right, Labview counts by statements not lines, so an error on line 14 could be on line 52, and your error message will be missing semicolon, or missing parth.. So descriptive, an error really means got back through your code with a very very very very very very fine tooth comb, and space stuff out, as far as i can from using the "C" in labview, labview likes to have everything just so, and you mess with it a little bit and BOOM 14 errors..

Sadly i don't know that much about doing more complex stuff in the formula node/C node, just basic stuff. Me and a programming mentor spent about 3 hours just figuring out the syntax for that, I caution you to try more complex items, but i also wish you the best of luck.

good luck

cody
__________________
Is now an engineer thanks to FIRST.

Last edited by XXShadowXX : 17-02-2009 at 19:18.
Closed Thread


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
Labview 8.5 vs. FRC Labview 8.5 pyr0b0y NI LabVIEW 0 01-02-2009 22:20
Labview Formulas GunfighterJ NI LabVIEW 2 15-01-2009 19:27
LabVIEW vs C/C++ 3DWolf Programming 11 05-12-2008 09:14
Labview tseres Programming 2 23-05-2007 00:27
Labview Phreakuency LabView and Data Acquisition 6 14-01-2006 01:14


All times are GMT -5. The time now is 01:06.

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