Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx base error -50103 on Mac OSX

Hi Berns-
 
Can you explain what you mean when you say you are seeing a race condition?  The VI I sent will always drive both analog outputs, but I don't see the potential for a race condition in the code.  It simply reads from two analog input channels, calculates a rough PID response for each input, and then writes the two responses to the corresponding analog output channels.  If you are only trying to use one channel at a time then you should remove the second, but the VI should function properly for two channels.
 
Thanks-
Tom W
National Instruments
0 Kudos
Message 11 of 17
(2,337 Views)

Hi.

I have the USB-6008/6009 device.

I want to connect a rotational encoder with two chanels (main one and one with phase shift to set direction).

I keep getting the same message :"Error -50103 occurred at DAQmx Read (Analog 1D DBL 1Chan NSamp).v"

I looked at the notes earlier on this thread and tried the base_2AI example. Then I modified it a bit but with no results.

My phisical connection is RSE to AI0 and AI1.

What can I do?

 

Thanks

Assaf

Student at the Technion, Israel .

 

 

0 Kudos
Message 12 of 17
(2,178 Views)
Hello Assaf,

As Tom stated earlier, you could receive this error if you try to run multiple tasks of the same type on the same device. You said you were using ai0 and ai1, but did not mention if those were both on the same device; I am assuming they are. For more information about possible causes of this error you can examine this document. I hope this helps. Let me know if you continue to have problems.

Matt Anderson

Hardware Services Marketing Manager
National Instruments
0 Kudos
Message 13 of 17
(2,164 Views)
Hello Tom:

This has been quite sometime and I think I did resolve the issue already. But what I can recall is that the M6251 DAQ card seemed not to work like two independent analog channel output at all? I have seen on the scope two of the shuould be available channels getting lost when one on each turn need to output the controlling voltage. Maybe I am wrong to say it is a race condition or maybe it is just bad programming? Since the input channels are multiplexed it does seem that each PID output channel get lost its grip when I switch sampling my input signal? I resorted to an old style legacy programming to provide the solution. My positioning galvanometric laser scanning system project terminated well at the end anyway.

Thanks.

Berns B.
Bernardino Jerez Buenaobra
Senior Test and Systems Development Engineer
Test and Systems Development Group
Integrated Microelectronics Inc.- Philippines
Telephone:+632772-4941-43
Fax/Data: +632772-4944
URL: http://www.imiphil.com/our_location.html
email: Bernardino.Buenaobra@ph.global-imi.com
Message 14 of 17
(2,158 Views)
Hello Dr. Berns,

I'm not sure I understand your post, but I believe the issue you described is related to the use of multiple analog output tasks in the same program. You can only have one task running at a time in a program. So, if you were attempting to generate on two analog channels using two different tasks you would have to stop one task and start the next one. This may lead to the "channels getting lost" that you are seeing. Other than that, I'm not exactly sure what issue you were experiencing. For an example of simultaneous analog output tasks in NI-DAQmx you can check out this document on our website.

Message Edited by Matt A on 03-14-2007 03:21 PM


Matt Anderson

Hardware Services Marketing Manager
National Instruments
0 Kudos
Message 15 of 17
(2,149 Views)

Dear Tom,

I have the same Project and want to acquire multiple channels synchronously but in C++. First of all I tried to use multi threading but thanks your post I've got that I was wrong. In order to obtain and save these data I have written "Dev1/ai0:1" as 5th parameter of the function "DAQmxReadAnalog64" and I've changed the definition of the parameter, in which data will be saved to a 2-D Array as "float64 data[2000][2]".But I face the error:

cannot convert parameter 5 from float64[2000][2] to float64[]

Sure it is due to the definition of the function "DAQmxReadAnalog64" which gets 1-D Array as 5th parameter. Whould you Plz explain me how can I get acquiered data from multi channels and save them for example in a 2-D Array?

best regards,

Mohamamd 

0 Kudos
Message 16 of 17
(1,299 Views)

Hi Mohamamd-

 

You mention the DAQmxReadAnalog64 function (whose name seems slightly malformed, but I get the point), but this is a thread with questions about NI-DAQmx Base.  Which O/S and driver API are you using?

 

Regardless, it sounds like you could benefit from viewing a shipping example that shows the use of the "C" APIs for your driver package.  For example, the DAQmx/DAQmx Base device names are not used as parameters for any Read functions.  You have to create tasks and virtual channels before you can Start and Read from those tasks and channels, and the create virtual channel function is where you specify the physical channels to use.

 

The relevant examples can be found either under the start menu (in Windows) or in folders alongside the driver configuration applications and support files on other platforms.  Please try to locate those examples and use them for guidance.  If you have other questions about using those examples, please create a new discussion forum thread.

 

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 17 of 17
(1,290 Views)