LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DSC and DAQmx / DAQOPC client not compatible with DAQMX

Dear Laura, thanx a lot for the wonderful answer, the DAQmx VI is working perfectly and detecting all the global virtual channels.Smiley Very Happy
I am making a project.  I  want  to  send continuously six pulses  to  four  different channels and the interval between the set of six pulses should be 150ms. The square wave should have an amplitude of 1.5 volts and frequency 130 and the the reason I am using a DAQmx  VI is becaue it is very accurate.There should be a  delay of 50ms between each  channel. I am telling you this so that I know that this is possible, using DAQ VI and that I have chosen the right direction.

How can I make the output of the DAQmx VI  go to a specific channel or channels for eg. PXI1Slot2/ao0?

I tried using  different channel constants, I also chose  DAQmx Physical channel constant but it gives an error.  Sending a screenshot once again.
take care.
Download All
0 Kudos
Message 11 of 24
(2,009 Views)
One more question I would like to ask, if I use the PXI1Slot2/ctr0, there is no from the counter control, and want to measure the output with an oscilloscope, there is no pin named ctr0.
and this can be seen with the two boards that I am using. the circuit diagrams of the boards are as follows:

Quick Reference Label for M Series:
Connector 0:
http://digital.ni.com/public.nsf/ad0f282819902a1986256f79005462b1/61ed77983ad7cca386256f66008215f1/$FILE/SCB-68%20M%20Series%20conn%200.pdf

and Connector 1:
http://digital.ni.com/public.nsf/ad0f282819902a1986256f79005462b1/61ed77983ad7cca386256f66008215f1/$FILE/SCB-68%20M%20Series%20conn%201.pdf

thanx in advance.

0 Kudos
Message 12 of 24
(2,003 Views)

Hello Munir,

The screenshots that you attached show that you are trying to use the counter output functionality of your device with your analog output terminals, which are not compatible.  The counter outputs can be used to generate a TTL pulse train, so you will not be able to use this to get an output of 1.5V.   If you wanted to measure the counter output of your device, the easiest way to find the correct terminal, is to right-click on the entry for the device in MAX and choose "Device Pinouts".  You will then see that terminal 2 is the ctr0out terminal.  You may have to scroll down in the window to see this. 

To make the output waveform you have described, you will need to use the analog output.  There are two options you have.  One is to use the internal hardware clock and to create an array of values to output.  Each channel will need to have a different array because the outputs need to be offset from one another.  The other way would be to use software-timing and use the determinism of your RT controller to write 1.5 or 0 V to each line at a set interval to form the pulse train that you need.  I think that this second method would be slightly easier to implement.  To find examples of both of these methods, look at the Example Finder examples Cont Gen Voltage Wfm-Int Clk.vi and Gen Mult Volt Updates-SW Timed.vi. 

Regards,

Laura

Message 13 of 24
(1,990 Views)
Thank u Laura for the super answers once again,

As u must have guessed that  I am  newbie in Labview, I would like to ask another stupid question to u. I am sending pic of the pulse that I would like to generate. I looked at the "Gen Mult Volt Updates-SW Timed.vi"  but I have the following questions:

1) Will the software timed looped be reliable (will the timing remain the same) if the computer has a lot computing to do?
2)How can I build the array for the square pulse I want?  How can I build such a big array and put all the values I want in the array?
3)What  changes should  I  do  in the  program?

Thank you.
Sincerely,
Munir Afzal Bhatti.

0 Kudos
Message 14 of 24
(1,980 Views)

Hello Munir,

You said that you have a real-time system, so you can expect your loop to execute reliably.  You may want to use the timed-loop to control execution speed.  What is nice about using the software-timed architecture, is that once you write a value, it will hold until you change it.  You will only need to write 1.5V at the beginning of a pulse and then 0V when the pulse goes back to low.  You will have to choose your loop timing so that you can write data for each pulse.  You will have to write 0V multiple times between pulses this way.   The other thing you can do with the software timing is to write the whole sequence of pulses in each loop iteration, that way the timing is much easier to setup.  I would recommend setting this up and trying it to see if the timing is reliable enough for you before trying to build an array. 

Let us know if you are having trouble.

Regards,

Laura

0 Kudos
Message 15 of 24
(1,966 Views)
Dear Laura,
thank u for the answers.  I also looked at the "Cont Gen Voltage Wfm-Int Clk.vi". I put all the parametes and the signal was the one that I require. The second reason I want to use this instead of the other is that ,I want to make a general program in which the signal parameters could be changed easily. I want to ask u ,how can i create a 2 second delay after six pulses from the signal generator? how can I change the program to do this. You did tell me that using array would be easier ,but if it is possible in this one "Cont Gen Voltage Wfm-Int Clk.vi" it would be really great. thanks one again in advance .
Sincerely,
Munir Afzal Bhatti.
0 Kudos
Message 16 of 24
(1,955 Views)

Hello Munir,

I have modified the example that you are using so that it inserts 2 seconds worth of 0 data points to the end of the waveform in the buffer.  I am attaching it to this post.

Hope this helps,

Laura

Message 17 of 24
(1,942 Views)
Dear Laura,

Thanks a lot for the super program,I know I am giving u a big headache
but u have been a great help.
I want to tell you what kind of program
I want to make. Now we have the required signal, now I want to send the signal to four
channels (a,b,c,d), the difference b/w channel a and b should be 50ms and a and c should
be 100ms and a and d should be 150ms.Next the channels should be interchangeable i.e
there should be an option to interchage the signals between different channel randomly.
You know some sort of switching or routing.

I want to make the following changes in the program, can you give me some idea to do this?
 
1) The pulse that I am getting is Bipolar, I want to make it monopolar i.e
   (no negative value on the oscilloscope). Starting from 0 to +1.5 and again to 0.
2) How can I make the Oscilloscope's display move w.r.t signal and time?
3) How can I make the no. of samples equal to the required delay that are initialized to zero come to the start of the
   waveform in the buffer in order to make the delay?

Sincerely,
Munir Afzal Bhatti.

0 Kudos
Message 18 of 24
(1,934 Views)

Hello Munir,

It seems that there are a number of changes that you would like to make.  I would recommend changing one thing at a time and then testing the results to make sure that everything functions the way that you want it to.  For example, to change the pulse to be monopolar, you could add the appropriate value to each affected array element using the array functions. 

After doing this simple task, I would work on changing the program to output to multiple channels instead of just one.  To do this, you could use the original waveform from the Waveform Buffer Generation VI and change the polymorphic instance of the DAQmx Write VI to multiple channels instead of single channel.  You then use the the Build Array function to combine your four separate waveforms into a 1D array of waveforms.  I am attaching a simplified picture of what I am describing. 

Once you have multiple waveforms, one for each channel, you can modify each to meet your needs. 

Once again, make each of these changes one at a time and then test the VI afterwards to ensure everything works correctly.

Regards,

Laura

Message 19 of 24
(1,917 Views)
Dear Laura, yes I have tested one by one the changes. They are OK. I am having an error, the screen shots I am sending also.  I want to have a delay between the pulses at the start of the pulses,so I used the same technique which was used by u.( sec*sampling rate= Number of samples) I want to have a delay of 50,100 and 150ms. But when I put these values it gives "the number of samples to write must be equal"
Can u tell me what to do?

Can you also tell me if I want to interchange the signals to the channels randomly i.e send the 0 ms delay signal from channel a0 to a3 and so
on ,what funtion or technique can be used for that ?

Thanku once again.
Sincerely,
Munir Afzal Bhatti



Download All
0 Kudos
Message 20 of 24
(1,908 Views)