From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

x-can myrio 1900

Hi,

I bought myRio and the adapter xcan stratom to use for electrical system of motor test bench. I have some problems with signals analysis: I use the read example script in LabVIEW, but it looks as some particular signals are read more speedly and more often than the others with a big delay ( xcan prefers reading only two identifier ) .  I have tried to change the frequency in scan engine of myRio, but nothing changes! What is the problem?!?

0 Kudos
Message 1 of 7
(8,245 Views)

Hi,

CAN interface in myRIO does not pass through FPGA. The reading speed is given by Timed Loop Rate. The application is doing other tasks?

0 Kudos
Message 2 of 7
(8,218 Views)

No there is only the x-can connected, the problem is that we read only two identifier continusly and sometimes the other. If we connect the can to a cRio module we read all identifier continusly then it isn't a signal problem. 

0 Kudos
Message 3 of 7
(8,207 Views)

Hi


I also working on the x-can project and have a same problem. I email this issue to stratom but on one reply me. As the x-can does not pass through FPGA. The VI is not open.


So i consult local NI engineer. And he said you need to add a filter but it still not a perfect solution.

 

I hope stratom can update their API and library.

 

 

0 Kudos
Message 4 of 7
(8,132 Views)

wcchung33a,

Can you give me more details on what you are seeing. I know this is late but I am interested in fixing this if it is infact a problem.

Thanks,

0 Kudos
Message 5 of 7
(7,804 Views)

Hi Dan 

 

Thanks for your help. I am sorry my late reply.

 

The problem is that the xcan cannot receive all can frame from the CANbus device. it miss some CAN frame. Comparing with xcan and NI 9862, The performance of xcan is not good.

 

I modify the example labview code to read CAN frame such as add filter and mask but the result still unsatisfactory. I attached the screenshot and vi for your reference.

 

Thanks

Andy

Download All
0 Kudos
Message 6 of 7
(7,779 Views)

Three things I noticed. In your top loop you have no timeout and therefore could be "railing" the processor on the myRIO which could cause timing issues with the SPI bus and utimately the X-CAN software Read interface. Try adding a "Wait Until Next ms Multiple" of 10 ms to your top loop. Second, if there is no new data on the Read X-CAN Frame VI, it will error to 8001 and you enqueue an empty frame. You should only enqueue CAN frames if there is no error from the Read X-CAN Frame VI. Third, on your bottom loop you should put a wait (maybe 100ms) on your dequeue and remove your 1 ms wait. I am wondering if you are having problems because you are railing the myRIO processor. It should be noted that the X-CAN frame rate is only capable of reading messages at ~250-270 Hz due to limitations on the myRIO SPI bus . Should not be problem in your case but just FYI.

Let me know if these fixes help you.

Thanks, 

0 Kudos
Message 7 of 7
(7,723 Views)