Discussion:
CRIO CAN 9853 same data issue
(too old to reply)
DirkW
2008-03-17 14:10:08 UTC
Permalink
Hi Dustin,
The CAN I/O node has a timeouty for waiting on a frame to arrive. This timeout is typically 10 seconds. When this timeout happens the node executes and receives an empty frame. You have to take care to handle these timeouts by using a case for the timeout error and one case for a regular frame. See the examples for details.
If this is not the reason for your problem, please post your code, so i could have a look to it.
 
DirkW
2008-03-18 13:40:09 UTC
Permalink
Hi,
I would need to see your FPGA VI to make any suggestions. Your RT VI is far to complex and has to many missing parts to debug it. I hope you wrote this code and understand how it works, because you have to debug it.
I would start with isolating the CAN part into a single VI, so you can debug the CAN traffic more effective. Then try to send a FRAME you know with a rate you know and debug the data flow within your RT environment.
DirkW
FargoDude
2008-03-19 14:10:08 UTC
Permalink
Dirk, one of the most important things to keep in mind is that EVEN the
FPGA CAN cluster is showing the same/repeated data, so the FIFO and
99.99% of the code should not be the problem.

That being said are there any recommendations.

Thanks
Dustin
FargoDude
2008-03-26 17:10:10 UTC
Permalink
After messing around with it and getting nowhere, I tried
Port 1, and it started to work for a few minutes then quit.
So then I decided that it must be bad hardware. So I opened it up to see if
there were any glaring issues and I found what look like to be manufacturing
defects. See photo.

I ordered a new board and it's currently working like it should.

But this brings up another question. There does not appear to be any examples
of how to synchronize can data with other data such as analog inputs.


I know there is a timestamp, and theoretically I could somehow
match timestamps on the fly, but there has to be a better way.


Thanks


Dustin


 


DSCN1011.JPG:
Loading Image...
O_Proulx
2008-03-31 21:10:08 UTC
Permalink
Hello Dustin, Can you give more details as to what exactly you want to see after synchronization?  There are a few ways I interpret synchronization in this case:1.  You want to timestamp both your analog outputs as well as your  CAN frames to know the time difference between analog outputs and CAN transmission.  For example, if a CAN Frame is received at time 0, you want to know how many seconds later was an analog output sent?2.  You want to send a CAN Frame at the same time (synchronized) as an analog output.3.  You want to update the analog output value every time a CAN Frame is received.Can you please let me know which of these you want to accomplish, or expand a little bit more on exactly what you are looking to do.Have a great day.
FargoDude
2008-04-01 13:40:06 UTC
Permalink
O. Proulx, My application is just a 50+ channel data logger, so it mainly deals with timestamping Analog Data with CAN data.I did see an example Called 9853 SYNC_CAN and it appears to create a timestamp based of each CAN frame.It's not exactly clear to me how this would be used, though.For example let's say that I am reading Engine RPM via an analog input and CAN message that is at an Update Rate of 50msI would like to see them at the same value in time. I think where it get's tricky, is that I have over 50 hardware channels of data and I would like to collect at 5kz.(Speed and FPGA size seem to be causing issues)Thanks,Dustin
DirkW
2008-04-01 14:10:07 UTC
Permalink
Hi Dustin,
Did you see the KB about cRIO CAN Sync? Here is the Link again. It explains that the CAN timestamping starts on CAN "Start" and has a resolution of 100 ns. You could measure the timing offset to your DAQ process and simply remove this offset ones, as described within the KB.
<a href="http://digital.ni.com/public.nsf/allkb/F435AC480BEC979F86257364005888FE?OpenDocument" target="_blank">KB LINK</a>
The same is true for multiple channels from multiple messages. If they need to have the same timestamp, you could allign the timestamp for all messages to the timestamp from the first message.
DirkW
FargoDude
2008-04-08 16:10:14 UTC
Permalink
Dirk, thanks for the info. This example does not directly illustrate what I think that I need, but does give me something to think about. Regards,Dustin
Loading...