Go to Post They really should put warning signs at all entrances: "WARNING! FIRST IS CONTAGIOUS!" - KenWittlief [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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
  #1   Spotlight this post!  
Unread 22-02-2011, 23:18
Lemonsy Lemonsy is offline
Registered User
FRC #3028
 
Join Date: Feb 2011
Location: Hidalgo, Texas
Posts: 2
Lemonsy is an unknown quantity at this point
Java to Labview, using "if else" statements and pressing buttons

I'm originally a java programmer, but I've taken on Labview since this past last year. I'm trying to make a code that will assign a value of 0 when a button ( button 1) is pressed and then change that value into a 1. When the button is then pressed again the value is changed back into a 0.

This code is for a claw that will open and close. Any advice, help, or screenshots?

int x=reader.nextInt(); // takes value of pressing the claw button
while (y==1) //the robot is turned on
{
if(x==-1)
{
claw=0; //open position
}
else(x==0)
{
claw=1; //close position
}

x=reader.nextInt(); //checks the next value of the claw button
y=OnOrOff.nextInt() //checks if robot is on or off
}
Reply With Quote
 


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


All times are GMT -5. The time now is 00:44.

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