Go to Post I guess we're going amish this year. - Jon Anderson [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
  #1   Spotlight this post!  
Unread 07-02-2009, 13:10
PRAWG PRAWG is offline
Registered User
FRC #1403
 
Join Date: Feb 2009
Location: Montgomery, N.J
Posts: 1
PRAWG is an unknown quantity at this point
HELP!!! BOOLEAN VARIABLES IN LABVIEW

Hey guys, I'm having some trouble getting limit switches working in our robot. We are using 3 Limit Switches for different positions on the Lazy Susan. We have planned out the code in notepad as follows,

Code:
//ls1 = limit switch 1
//ls2 = limit switch 2
//ls3 = limit switch 3
// 1= go left
//-1 = go right

boolean left = 0
boolean top = 0
boolean right = 0

if (ls1 = 1) then
	left = 1
end if

if (ls2 = 1) then
	top = 1
end if

if (ls3 = 1) then
	right = 1
end if



//button 4
if (left = 1 && top = 1 && right = 0) then
	speed = 1
	if(left = T) then
		top = 0;
		speed = 1until ls1 = 1
end if

if (left = 1 && top = 0 && right = 0) then
	speed = 1
	speed = 1 until ls1 = 1
end if

if (left = 1 && top = 1 && right = 1) then
	speed = 1 until ls1 = 1
end if

if (ls1 = 1 and left = 1) then
	speed = 0
end if

/button 5

if (left = 1 && top = 0 && right = 0) then
	speed = - 1 until ls3 = 1
end if

if (left = 1 && top = 1 && right = 0) then
	speed = - 1 until ls3 = 1
end if

if (left = 1 && top = 1 && right = 1 && ls3 = 1) then
	speed = 0
end if


/button 3

if (left = 1 && top = 0 && right = 0) then
	speed = 1 until ls2 = 1
end if

if (left = 1 && top = 1 && right = 0) then
	speed = -1 until ls3 = 1
end if

if (left = 1 && top = 1 && right = 1) then
	speed = - 1 until ls3 = 1
end if

if(ls2 = 1) then
	speed = 0
end if
We need help initiating a boolean variable(or array), but we cant find it in LabView. help us pl0x.

Last edited by PRAWG : 07-02-2009 at 13:13.
 


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
Making global variables in LabVIEW. Joshamuffin National Instruments LabVIEW and Data Acquisition 1 19-01-2009 13:35
[FTC]: Variables in labview wilsonmw04 FIRST Tech Challenge 2 23-11-2008 08:57
Labview dashboard and multiple variables Joe Ross LabView and Data Acquisition 2 15-03-2006 21:55
Help figuring out controller variables fwxer Programming 1 31-01-2005 02:28
Need help with Variables ? David Bryan Programming 5 23-02-2004 07:42


All times are GMT -5. The time now is 02:27.

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