LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

mx Card Pulsing

I am trying to set up serial communication with a 6534 mx card.  I have looked at the sample code and can not get the right channel in the initialization routine.  This is the line giving me trouble.
 
 DAQmxCreateCOPulseChanFreq (ClockHandle, "Dev2/PFI0", "", DAQmx_Val_Hz,
                            DAQmx_Val_Low, 0.0, 10000000, 0.5);
The error message states that this channel can not do this action.  If not this channel than what channel will work????
 
Thanks for any help.
 
 
0 Kudos
Message 1 of 6
(3,494 Views)
Hello!

The 6534 is a digital card, so you will want to use the digital DAQmx functions.  The string of code that you are trying to use is used when you are programming a counter.  I would suggest looking at the DAQmx examples that should be installed on your computer at the following location: C:\Program Files\National Instruments\NI-DAQ\Examples

If you are using C then click on DAQmx ANSI C and then Digital to look at the DAQmx digital examples.  In these examples you will see different commands such as DAQmxWriteDigitalLines that will work for you.

I hope this helps clear things up.  Have a good day,

Brian P.
Applications Engineer
0 Kudos
Message 2 of 6
(3,468 Views)

Brian

I was intialing just trying to get a clock signal set up which I will need serial communication.  I have been through the samples a couple of times that is where I got the above code.  I need three signals out of the card, a clock, data and enable all running at 10MHz.

 

Thanks

Cecil

0 Kudos
Message 3 of 6
(3,462 Views)
Hello Cecil,

One problem might be the fact that PFI0 is a fixed directional line and is used for input operations.  PFI pins 0-3 are  used for input and PFI pins 4-7 are used for output operations.  So the error that you are receiving might just be because you are trying to perform an output operation using a pin that can only be used for input.  Try using PFI4 in your code instead.

You can read more about the different pins on the 435x card by looking at the NI-DAQmx help file found on your computer at the following location:  Start Menu>>Programs>>National Instruments>>NI-DAQ>>NI-DAQmx Help.  Then just search for "435x" and look at the first result returned.  Please let me know if this works for you. 

Have a good weekend,

Brian P.
Application Engineer
0 Kudos
Message 4 of 6
(3,452 Views)

Brian

I tried PFI4 and got the same error.  This is the error.

I/O type of the physical channel does not match the I/O type of the virtual channel you are creating.

Status Code -200430

 

Thanks

0 Kudos
Message 5 of 6
(3,448 Views)
 

Cecil,

First of all, in my previous post I made a mistake and I typed 435x instead of 653x.  The steps are the same so just ignore my typo.

Have you tried running the digital examples as I suggested?  The 653x card doesn't have any counters available so you will not be able to use the DAQmx counter functions.  The reason you are receiving your error is because you are trying to pass a digital channel into a counter function which doesn't work. 

Digital ANSI C Examples
C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Digital\Generate Values

A great resource to refer to is the DAQmx Help File for the 653x.  This file is specific to your device and it explains all of the different configuration options you can use including information about generating digital signals and pulse trains.

Have a good weekend,

Brian P.
Applications Engineer

 

Message Edited by wildcat_600 on 01-19-2007 11:05 AM

0 Kudos
Message 6 of 6
(3,437 Views)