LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does this program group and cluster these button values into an array?

Solved!
Go to solution
Ok so I have some of it figured out and have managed to now instead of starting at the back 8 I am lighting up 0-7 (see attached code), I get that the first one is 255-2^0, and so on but when i get to the 8th button, it becomes 255-256 which is obviously does not work for turning something on or off. Any thoughts?
0 Kudos
Message 21 of 30
(2,328 Views)

 

 

Ok so this program works and i can control everything but i have to manually switch between the two ports. good way around this? 

Message Edited by superomario on 06-17-2010 08:47 AM
0 Kudos
Message 22 of 30
(2,322 Views)
If you want to control both ports add both ports to your task and calculate from 0xFFFF instead of 0xFF- 

"Should be" isn't "Is" -Jay
Message 23 of 30
(2,307 Views)

superomario wrote:

Ok so this program works and i can control everything but i have to manually switch between the two ports. good way around this? 


 

On a side note, your code is very inefficient and wasteful. The entire left sequence frame logic can be replaced with a simple radio button control. Currently, it uses 100% of the CPU while not doing anything except polling for input useful.
 
You also have a mess with datatypes. (notice the coercion dots). Your function does NOT expect I32. 
 
0 Kudos
Message 24 of 30
(2,297 Views)

At the very least, move your DAQmx Create Channel and Start Task to the outside of the loop and wire the task in. Move the Clear Task to the outside also.

 

Message Edited by Broken Arrow on 06-17-2010 03:08 PM
Richard






Message 25 of 30
(2,289 Views)

That has worked! Thank you for all the help, but I have one final question. The two isolation valve buttons wired to 40 and 80 respetctively. what does that mean? I guess you can tell by me asking this I am getting a conflict between the two and two of the buttons in the cluster, in that both sets write to the same board spaces.

Message 26 of 30
(2,257 Views)
Solution
Accepted by superomario

little bump, if i can get this all working by the end of today that would be amazing. thanks for everything everyone who helped!

0 Kudos
Message 27 of 30
(2,219 Views)

 


@superomario wrote:

Ok so this program works and i can control everything but i have to manually switch between the two ports. good way around this? 


 

Sorry, I don't understand this comment. Which two ports? How should they be automated? Based on what?

 

Ignore my comment about the radio button control. It is not available in LabVIEW 7.0. You should really upgrade!

 

Here's a quick draft about what I meant with the radio button control. (At the moment I am ignoring the DAQ parts completely, so don't pay attention to that. Yes, as others have said part of it should go outside the loop)

 

As you can see, using a radiobutton control eliminates 80% of your Rube Goldberg code. Here is the new front panel and diagram. You can still do a bitwise invert and other tweaks as needed. I don't know the exact specs.

 

(The attached code is 2009, so it won't help you unless you upgrade.)

 

 

 

 

Download All
0 Kudos
Message 28 of 30
(2,200 Views)

Thanks for the program, I am now searching for a better lab view version somewhere nearby! but in the meantime i have managed to get it working. granted i  made it worse to do so, and had to split up the two sets of 6 buttons so that i can have more than one on at a given time, but it works for now. I will keep working at it though and keep any interested parties updated on my labview learning/ programming progress! thanks again everyone.

Message 29 of 30
(2,195 Views)

Glad we could help-

 

Definatly look into an upgrade!  There are reason to maintain old versions of LabVIEW but very few.  In fact I know of some companies in regulated industries that have test systems running in LabVIEW 6.1 upgrading would require revalidating the entire suite of code and the cost of that is prohibitive.

 

Of coarse, when considering system design, one can plan in advance the upgrade schedule and build in these costs up front as a real price and save a large company a lot of money in the long term.  A search will turn up many stories of woe from users looking for a fix for equipment that has become obsolete- or worse software that has become obsolete! 


"Should be" isn't "Is" -Jay
0 Kudos
Message 30 of 30
(2,179 Views)