LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to SPI device using NI PCIe-6363

Solved!
Go to solution

I'm trying to write a labview program to write to a simple SPI device using the DAQmx 6363. I've found a library and some example code, and have begun using the "DAQmx SPI - Internal Clock.vi".

http://www.ni.com/example/31200/en/

I believe this is the right place to start but I keep coming across errors that I can't locate.

 

Error -200452 occurred at Property Node DAQmx Export Signal (arg 1) in Init IntClk Device.vi->DAQmx SPI - Internal Clock.vi

Possible reason(s):

Specified property is not supported by the device or is not applicable to the task.

Property: DataActiveEvent.OutputTerm

Task Name: _unnamedTask<18>

 

I've found the vi causing the problem, but I'm not sure what the problem even is. Any assistance is appreciated.

 

0 Kudos
Message 1 of 10
(4,493 Views)
Solution
Accepted by topic author lordmonty

I believe this KnowledgeBase article contains the answer to your question. Follow the steps shown in the KnowledgeBase article to determine if the property node you are using is supported by your card.

 

Aaron Douglass
Applications Engineer
National Instruments
0 Kudos
Message 2 of 10
(4,444 Views)

Thanks, that helped a lot actually.

0 Kudos
Message 3 of 10
(4,424 Views)

Hello, I am using 6321 device. I am trying to use SPI on my device. I have downloaded DAQmx SPI - Correlated DIO example from this page: http://www.ni.com/example/31200/en/. But this example is not working. It always fail because of this error:

 

Error -200463 occurred at Init CorrDIO Device.vi

Possible reason(s):

Specified read or write operation failed, because the number of lines in the data for a channel does not match the number of lines in the channel.

If you are using the Digital Waveform datatype, make sure the number of lines in the digital waveform matches the number of lines in the channel. If you are using boolean data, make sure the array dimension for lines in the data matches the number of lines in the channel.

Number of Lines in Channel: 1
Number of Lines in Data: 3

Task Name: _unnamedTask<1B>

 

How can i fix this?

 

 

0 Kudos
Message 4 of 10
(4,194 Views)

Hey there Ondrejka,

 

Could you post the data that you are trying to write to the digital line? 

 

There may be a dissagreement between the length of the data being written and the number of ports being written to.

 

Applications Engineer 

National Instruments

0 Kudos
Message 5 of 10
(4,176 Views)

I am sending 0xF or 0xFF. But I tried to send many types of data and nothing was working. I attached my program and picture of settings I made. 

0 Kudos
Message 6 of 10
(4,165 Views)

Hey  Ondrejka

 

Unfortuanately I am unable to open the VI's that were included in this zip file because some of the subVI's were missing. If you could include those subVI's that would be great so I can see how all of the DAQmx set up is done.

 

Thanks,

Applications Engineer

National Instruments

 

0 Kudos
Message 7 of 10
(4,155 Views)

Hello,

It was example from this webpage: http://www.ni.com/example/31200/en/#h31

On the right side of the page there is section downloads. I have downloaded  serial_wfm_1_0_1_lv85.zip . I tried to run DAQmx SPI - Correlated DIO. Program prompted me to find VI "Get Terminal Name with Device Prefix ". I found it in my examples directory: C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\DAQmx\_Utility 

Then I changed data on the front panel (I have posted picture of this setings before) and then I failed because the error(I posted this error before). 

Please can you show me how to change this example? Or does it exist another working example for my device X series 6321? I am beginner at using Labview and making my own VI for sending data threw SPI on my device is impossible for me :). 

 

0 Kudos
Message 8 of 10
(4,129 Views)

Hey Ondrejka,

So a lot of times that error can come from how the digital device is initialized. Try changing the digital input and output configuration to "one channel for each line". 

 

Applications Engineer 

National Instruments

0 Kudos
Message 9 of 10
(4,098 Views)

Hello, I am so sorry for not responding for such a long time. I was really bussy. 

I tried to chande input and output line to " one channel for each line". It doesnt help :-(. The same error still remains. Please do you have any othet suggestions how to fix this? 

 

Thank you for your sesponse. Ondrejka.

 

0 Kudos
Message 10 of 10
(4,026 Views)