Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

error while porting the spi_single_port_example to a sbRIO 9636 device

Hi, To communicate whit an external device I want to use the SPI protocol. I have found an example implementation of this protocol on the NI community (https://decibel.ni.com/content/docs/DOC-7945). I have some troubles while porting this example to the sbRIO 9636 device I use for development. I have created a new project (see attachment) in which I've added the sbRIO 9636 device and FPGA target and the VI's (+dependencies) of the example project. Afterwards I renamed the necessary DIO pins to the names used in the example project. When I try to compile I get an error message concerning a diagram constant: "FPGA I/O project item not found. You must add the I/O item to the Project Explorer window or select a different item from the FPGA I/O control or constant." Could someone help me solving this error because I don't know where to start. Thanks in advance, Gori

0 Kudos
Message 1 of 11
(8,281 Views)

HI.

What may be happening is that the project he is leading is you had some additional modules, and is in conflict with yours.

It also had two wires connected to the same point, this also leads to conflict, I made some corrections and the idea is that you compile and test. Additionally if you have the robotic module installed “LabVIEW Robotics”, you will find an example in the "help", if you have not you can watch the Annex.

 

Regards.



Ing. Jonathan E. Cruz Ortiz

ENERGÍA PROACTIVA S.A.S

Cel : (+57) 3173669343 - (+57) 3124451894

Message 2 of 11
(8,266 Views)

Hi Jonathan,

 

Thanks for the corrections and the tips. I've tried to compile the edited version but without success I'm affraid. I'm still getting the same error on the constant definition of the cluster with the FPGA I/O nodes. You mentioned possible conflicts with modules from the example project. that could be the case since that project contained C-series modules whilest this project doesnot since it is a sbRIO project. Could you explain me how to identify and solve these conflicts?

 

Thanks,

Best Regards

Gori

0 Kudos
Message 3 of 11
(8,246 Views)

I also check and gives me the same error.

This code can be checked more thoroughly, but otherwise You Tried the attached code?, who works with a sbRIO 9631 or with the example of the page that you had mentioned earlier https://decibel.ni.com/content/docs/DOC-7945 , working with sbRIO 9602 "spi_dual_port_example", to check if they work.



Ing. Jonathan E. Cruz Ortiz

ENERGÍA PROACTIVA S.A.S

Cel : (+57) 3173669343 - (+57) 3124451894

0 Kudos
Message 4 of 11
(8,236 Views)

Hi Jonathan,

 

I've managed to compile my code by reinitializing the constant clusters with the FPGA IO nodes from the sbrio platform. I guess this is a bug in labview or more likely due to bad practices (a type definition may be better?).

 

Thanks for your help!

Best Regards

Gori

0 Kudos
Message 5 of 11
(8,162 Views)

Hello guys,

 

Can you provide with the MAX Reports of your systems?

This will allow met to check (and retry at my side with another version to see) if it's related to a specific version of LabVIEW/LabVIEW FPGA.

 

Thanks in advance!

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 6 of 11
(8,036 Views)

Hi Thierry,

 

In attachment the support report from Max, I've also included the latest version off my code.

I've managed to compile the code by now and I'm also able to send a single byte over the SPI bus but sending multiple bytes does not work. I think the code enters an infinite loop trying to read the data (the MOSI port is looped back to the MISO port).

 

Best regards,

Gori Nieubourg

Download All
0 Kudos
Message 7 of 11
(8,032 Views)

Hello Gori,

 

I did some tests and the original FPGA IO error was cause by some incorrect capitalization for the SCLK DIO-pin.

These IO names are sensitive to capitalization.

You had "SClk" and in your code you mentioned "SCLK"

 

Before going deeper into your code.

Which debugging steps have you already tried?

What did you change in the original code.

Did you change anything in the "Example_port Code_cRIO" or in the top level VI?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 8 of 11
(8,013 Views)

Hello gori,

 

Please mark the question as resolved when your problem is resolved.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 9 of 11
(7,828 Views)

Hi Thierry,

 

I'm currently working on some other things that have a higher priority. I'll post an update in this topic when I have a chance to work on it.

 

Best regards,

Gori Nieubourg

0 Kudos
Message 10 of 11
(7,807 Views)