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
How do I recognize this 11110111? and in terms of the program if everything is the same voltage how does the VI know which port is which? If I add one more button to all the clusters it puts out a negative value and then nothing works. I guess I am still asking/confused on how this program works
0 Kudos
Message 11 of 30
(1,838 Views)

<i>to add a new valve you would need to decide what bit you would use to drive it and code in that bits' value to write a 0 in that bit. </i>

 

I would like more elaboration on this please. I do not know how to code in any of this information let alone where. 

0 Kudos
Message 12 of 30
(1,836 Views)

1snip.png

 

Ok- I think this explains a bit(or several)

 

And revised to add new valve

 

2snip.png


"Should be" isn't "Is" -Jay
Message 13 of 30
(1,815 Views)
Thanks Jeff that explains a lot, I have one more question though. The board was set up with this program to start at slot 8, so slot 8 is the "0" in the array. and adding a new button just pushes everything up 1 so isolation valve is now 15 (the last slot), how can I rewrite everything so that it starts at slot 0? and 0 is is 0 in the array?
0 Kudos
Message 14 of 30
(1,808 Views)

The task!

 

The task defines the physical channels that are associated with each bit. so if you create a task that has Channels(

Dev1Port0B0

Dev1Port0B1 

Dev1Port0B2 

Dev1Port0B3 

Dev1Port0B4 

Dev1Port0B5 

Dev1Port0B7 

Dev1Port0B6)

 

would take a 0b10101111 and turn on bits 5 and 7

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 15 of 30
(1,795 Views)
This is going to sound stupid but, where are you referring to? The task?
0 Kudos
Message 16 of 30
(1,782 Views)

3Snip.png

When you create a DAQmx Task there are many properties that need to be configured.  including what physical channels you use.  I' modified the create channel vi you have to expose the channel control.  It would be a good idea to read the DAQmx help file at:

 

123.PNG


"Should be" isn't "Is" -Jay
Message 17 of 30
(1,765 Views)

Can you tell me what I am looking for in the help? I'm not even sure where to begin with this honestly, most of the stuff you have been saying is kinda going right over my head.

 

Right now I think the program was set up for 8 lines which is why I can only make 8 slots on the card work. But I still dont get where it is defined for it to start at the 8th slot on the card and not the first. so if I change it to 16 slots, it looks for a spot after the last on the card and then errors since there isnt one. 

0 Kudos
Message 18 of 30
(1,726 Views)

I'd recommend starting with the heading "NI-DAQmx Key Concepts" and read through the entire section!!! 

 

The same section is duplicated in the LabVIEW help file under the heading "Taking Measurements."  Seriously, you are going to need to understand DAQ key concepts- and the help file reads better than my typing of the same info. 

 

 


superomario wrote:

Can you tell me what I am looking for in the help? I'm not even sure where to begin with this honestly, most of the stuff you have been saying is kinda going right over my head.

 

Right now I think the program was set up for 8 lines which is why I can only make 8 slots on the card work. But I still dont get where it is defined for it to start at the 8th slot on the card and not the first. so if I change it to 16 slots, it looks for a spot after the last on the card and then errors since there isnt one. 


Slots? what are slots? "Slots" do not translate into DAQmx entities, attributes, or properties.

 

Message Edited by Jeff Bohrer on 06-15-2010 10:49 AM

"Should be" isn't "Is" -Jay
0 Kudos
Message 19 of 30
(1,714 Views)
So I read over the help a lot last night, with much of it going over my head, but I have been using the DAQ assistant to try and make my own Digital out task/connection. This has produced some progress in that I have gotten the first 8 lights to all light up when i hit test. but I am looking at their Hex values and they are identical to the back 8. I'm guessing this isnt a good thing, though instead of having both light up when I push the buttons now still only lights in the back 8 are controllable. The original task only had 8 lines (Dev1/port0/lines 0-7), so i made a new one that goes from port0 0-7 and has port 1 0-7 as i could not figure out how to extend the port0 to have more lines than just the 8. any more guidance would be great!
0 Kudos
Message 20 of 30
(1,694 Views)