LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 200077

Solved!
Go to solution

Use the dropdown for the AO task's DAQmx Write to select the NChan NSamp version.  Then leave the autostart at the default of False.

 

Here that ran without error and probes showed non-zero values being written to the task, confirming that the file read is working.  I don't know why you don't see actual output signals.  How are you checking for them?  I've got a suspicion the signals can be generated just fine but you're looking for them in the wrong place, at the wrong time, or with a method that doesn't reveal them.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 31 of 44
(1,393 Views)

Thank you for your reply. I have another question if I want to add another 1 analog and a few digital channels with different data file then what do I have to do? I want to mean for more channels should I have to give the input in "lines" of the DAQmx Create channel like 0:2(for 3 channels), or 0:4(for 5 channels) something like that, or do I have to add another DAQmx creat channel(digital or analog) and the rest.

Actually, I have tried with the 2nd method(I have attached the vi's, one with 3 channels for example, and one with all the channels I need in my experiment) and there is giving some error with the sample clock (Error 89137). But in the case of software timing I did this type of channel declaration but with software timing and that was giving result though time resolution was not resolved.

If I do as the first method then I have to change the input portion. Here I am attaching four input files two for the analog channel two for the digital channel. Can you please help me?

0 Kudos
Message 32 of 44
(1,373 Views)

Let's suppose you want to generate 5 channels of AO.  You should configure one single task with the channel range "Dev1/ao0:4".  Then your data file of sample values should be a 2D array.  Each line would be an individual channel and all 5 lines must have the same # samples.  The *order* is based on the order in which the ao channels are added to the task.  In this case, the channel order will be 0,1,2,3,4.

 

Much will be similar for generating 5 channels of DO, but reread the advice I gave back in msg #29.  You'll have just one task configured to use the lines "Dev1/port0/line0:4".   But your data file will be different.  Now, you'll be encoding your 5 digital line states into the lower 5 bits of an 8-bit unsigned integer (also known as a "u8").  For clarity, you might want your data file to encode those values in binary form using values that look like:  00110 10110 01001 00101.  Then when you convert the file string into integer data, use the "%b" format specifier in place of the "%d" shown in msg #29.  This interprets a string like "10110" as a binary representation of a number, namely the number 22 in decimal.

 

The reason to put all analog channels into 1 task and all digital lines into 1 other task is that your data acq device will only have 1 timing engine available for AO tasks and 1 more for DO tasks.  A timing engine is needed whenever you have a task with hardware-based timing.  This is the reason for the errors you saw - you were attempting to configure too many hardware-timed tasks.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 33 of 44
(1,358 Views)

Thank you for your prompt reply. The digital channel is giving a fine result after changing the input file but in the case of the analog channel, there is no output showing in the oscilloscope also there is no error showing. I have attached the revised programming as well as the data file. Please have a look.

And one more thing to ask, is there any other way to do this programming because generating the input data file for 5-8 channels togather will be a difficult job for our experiment, or is there any other approach we can have to solve this issue?

Download All
0 Kudos
Message 34 of 44
(1,348 Views)

Okay, I got it. The analog output is fine also. Thank you.

But I have that 2nd question is there any other way to give this data file separately or is there any other approach to do this problem such that we can give this data file separately for each channel?

0 Kudos
Message 35 of 44
(1,341 Views)
Solution
Accepted by topic author SUJITniser

Some of the things you *want* to do (and have tried) can't work because the data acq hardware doesn't support them.  So the first step is know and accept the hard constraints.  Then you can focus on how to source the sample data for your tasks in a way that's compatible with those constraints.

 

Here are some of your hard constraints:

1. Precise sample generation timing requires the use of a hardware clock and a buffer.

2. Your data acq device allows only 1 hardware-clocked task for each of your output types -- 1 for AO, 1 for DO.

3. For each channel in your task, you must write the same # of samples to the task buffer.  If you work with the data as a 2D array (channels=rows, sample #'s=columns), this will be *inherently* true because LabVIEW's 2D arrays are *always* a perfect rectangle.

 

I would generally advise *against* separate data files for individual channels.  I don't know your process for creating those files, but with separate files it's much less natural to know that they all contain the same # of samples representing output at the same sample rate.  Especially when your files are just delimited ASCII values with no info about sample rate.

 

Putting all the data into a single file sorta implies that you're figuring out all the channel data under the same conditions.  So it's much more natural to make sure they all contain the same # samples with the same sample rate.

 

As a side note, I'd advise that if you continue to define data in a delimited ASCII file, you should use either a comma or tab as the delimiter character rather than a space.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 36 of 44
(1,336 Views)

Thank you. As I said earlier We need more than 8 digital channels and more than 8 analog channels(with hardware timing) can you please suggest PXIe hardware for this? If we buy two or three PXIe systems(let's say PXIe 6361 and PXIe 6535) can it be posiible to synchronize and get my desired signals?

0 Kudos
Message 37 of 44
(1,313 Views)

Looks to me like the PXIe-6363 could work.  The key is that NI's convention on MIO devices is that only digital port 0 supports hardware timing.  So when you check out the product search page, it's important to specify a total of 48 DIO lines b/c it's also pretty typical to have ports 1 and 2 with at least 8 bits each.

 

The 6363 gives you 32 hardware-timed digital lines as well as 32 single-ended or 16 differential AI channels.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 38 of 44
(1,302 Views)

@Kevin_Price wrote:

Looks to me like the PXIe-6363 could work.  The key is that NI's convention on MIO devices is that only digital port 0 supports hardware timing.  So when you check out the product search page, it's important to specify a total of 48 DIO lines b/c it's also pretty typical to have ports 1 and 2 with at least 8 bits each.

 

The 6363 gives you 32 hardware-timed digital lines as well as 32 single-ended or 16 differential AI channels.


In addition to that, yes PXI modules allow synchronisation across modules through the PXI backplane. Even most PCI(e) boards from NI support that through their own proprietary RTSI bus, which is a flatland ribbon cable that connects all boards together through a connector at the top of the card. So you don't necessarily have to buy a single card that contains all the channels you need.

 

That said, if you can get a card that provides all the channels you need, it is usually easier since the external triggering of DAQmx tasks is never trivial. That's not because the DAQmx trigger model is awful (in fact it is very nice) but because external triggering is always a puzzle to solve. There are not a lot of separate synchronization lines available and not every signal routing is possible. Also it is very important to program the different task in the right order, with the controlled tasks being programmed first and the controlling task that triggers everything being last.

 

When selecting hardware you also need to be careful. Lower cost cards only provide limited external synchronization capabilities and not all PXI chassis support the same trigger line functionality. Especially lower cost chassis have generally significant limitations in how many trigger lines they support.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 39 of 44
(1,296 Views)

Thank you both. To be more specific I should have mentioned that I am using PXIe 1071 module with controller PXIe 8821 where I am using two cards PXI 6361 and PXI 6704. And as I said earlier because I need nearly 16 digital output and more than 8 analog output channels which can be controlled hardware-timed so I have to look for other cards where we can get this specification. As you suggested PXI 6363 looks good for digital output, we need a card for analog output also so can you please help us with it, and is this card will be fitted in PXIe 1071 which we are using now? Triggering both cards or synchronizing both PXI if that can be done with the RTSI bus as you said will be fine or if we have to write LabVIEW code and do it ourselves that is also fine we can learn how to do this synchronization. Anyway, this NI community is very helpful always, so learning this thing will not be a serious issue I think.

0 Kudos
Message 40 of 44
(1,288 Views)