LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Device Automation and Temperature Control

Please helpppp.................
 
After running the attached VI with some of the channels ON, it shows an error message...........
 
 
 
"Error -200524 occurred at DAQmx Write (Digital 1D Bool NChan 1Samp 1Line).vi:1
 
Possible reason(s):
Measurements: Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.
When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.
Number of Channels in Task: 1
Number of Channels in Data: 15
Task Name: _unnamedTask<1>"
 
 
Actually the objective of this VI is to generate +5V individually through the eight channels.[which can switch ON/OFF with the boolean switch.]
I also wanted to get a common 0V which I'm planning to take from the ground channel. [How can I assign +5V individually to each of the eight channels?
 
Please help meeeeeeeeeeeee...................
0 Kudos
Message 21 of 34
(1,294 Views)

You are receiving this error because  the line group setting on the Create DO Channel is not set correctly. See the attached VI.  I trust that you understand that when you press the first button in the 8x1 boolean array, you are actually changing the voltage on port0/line0 from 0 to 5Volts and so on.

KostasB

NIUK Applications Engineering

Message 22 of 34
(1,270 Views)

Hi KostasB,

I checked the VI. Thank you for the correction. By the way what does it mean by the "size[s]" tab? Whenever I run the vi, it shows 8.Even if all the eight booleans are OFF, it shows 8.

In the MAX, i configured only one task, in which I have selected the eight channels of port 0. I think it is good enough to control all of the eight switches seperately [I want to switch ON and OFF the switches individually. For eg, now I may need to ON channel 0 and channel 6, but after some time I may need to turn off the current channels and switch ON another two or three channels.... Is there anymore changes required?

Thank you soooooooooooooooooooo much for your helps...........

0 Kudos
Message 23 of 34
(1,258 Views)

Hi,

8 is the size of the array you are writing. It should always be 8 if you are writing to 8 lines.  Look at the attached VI and try to understand what it does. If you want to switch on all channels your numeric will be 255.

If you want to switch of all channels the numeric will be 0. You can peak the right value between 0-255 to switch on and off the channels of your choice.

KostasB

NIUK Applications Engineering

Message 24 of 34
(1,250 Views)
Hi.........
 
Now I got ittttttttttttttttttttttttttttttttttttttttttt
 
thank you sooooooooooooooooooooooooooooo much................
to all..................
with your support LabVIEW is as sweet as a cup of ice cream........
thank you again...........Smiley Very Happy
0 Kudos
Message 25 of 34
(1,245 Views)
Hi,
 
I'm attaching a new vi, through which I am planning to control 8 digital output channels to switch between +5 and 0 voltage. The USB device I'm using is NI 6008. Can anyone please tell me if it is possible to integrate time controlled triggering to this vi[for 6008]? I checked the shipping examples with LabVIEW but cant find any examples for 6008 model.
 
What I want to do is to switch ON/OFF the channels at certain times.
For example, Channel 1 and Channel 4 ON for 5milliseconds[all other channels will be closed]
After 5 milliseconds, channel 1 and Channel 4 OFF and channel 2 and channel 6 open for 10 milliseconds and so on.....
 
Is it possible to program the digital outputs of the eight channels so that all the process can be completely automated?[my device is NI 6008]
0 Kudos
Message 26 of 34
(1,223 Views)

Not sure where you found that example but it does not do any timing of the outputs at all. It just responds to front panel events.

The USB-6008's digital I/O is strictly software timed. That means you will be dependent on the accuracy of windows timing which is not very accurate at all. You can certainly try by inputting a couple of arrays to a DAQmx write inside a for loop. One array would be the logic states and the other array would be wired to a Wait (ms) function. The jitter is going to be in the order of milliseconds though.

Message 27 of 34
(1,213 Views)
Hi...........
Now we have a program to open and close eight shutters. Again we need to modify this program for  a more convenient operation. I know that it is getting harder. So what we want to do is to enable the program to operate upon our predesigned requests. I will explain this....
For Example, a typical experiment or growth process, will be like this....
1.       Start
 
2.       Open Shutter 1
          Open Shutter 2
          Wait 50 secs.
 
          After 50 secs...
3.       Close Shutter 1
          Close Shutter 2
          Open shutter  5
          Open Shutter 8
          Wait 5 minutes.
 
          After 5 minutes...
4.       Close Shutter  5
          Close Shutter 8
 
5.       Exit.
 
 
Do you have any idea about changing our current program to such an advanced program? So that every time, before the growth, we change the requirements. That is every time we will be using different elements[ie, different shutter numbers] and different wait timings. The above mentioned experiment has only 5 steps. Some times the steps may rise.
Does it make any sense? I really need your help. Please helppppppppppppppppppppppppp............................
 
I have two different programs and I'm attaching those....
Download All
0 Kudos
Message 28 of 34
(1,109 Views)
What you will want to look at is a state machine architecture, either built into or expanded upon the case structure you already have in the lower loop.  Create an array of clusters.  In the cluster you can have a command enum and an integer.  Commands would be wait, open, close, start, exit.  The integer would contain either the shutter number to open or close, or the number of seconds to wait.  As you move through the state machine, every you need to move to the next step, you just index that out of the array and execute the appropriate case structure.
 
The sequence data could be something you store in a text file and load at the beginning of the programming.
Message 29 of 34
(1,088 Views)
A variation or two that might be simpler.  Use the array of clusters, but feed that into a 3rd parallel loop that ihas its own state machine.  If you are in "automatic" mode, it will go through the array line by line.  If it is an open or close command it will feed a command into the queue you already have.  Or possibly you could use Value(signalling) property nodes to trigger events in the event structure you already have which will in turn feed the appropriate commands into a queue.  For a wait command in the list, it just spins until the amount of wait time has passed by comparing the timer value before that iteration and stored in a shift register with the current timer value.
Message 30 of 34
(1,085 Views)