CAN Frame Signal Conversion With XNet

When dealing with CAN, most new developer struggle with the Frame and Channel (or Signal) conversion.  Developers are trying to get away with using the cheapest CAN hardware, and as a result are opting to not use XNet hardware but instead use things like the USB 8473, or using non-NI hardware like the ValueCAN by Intrepid, or using Vector hardware, or CAN to serial adapaters.  The problem with all of these is you generally just read and write frames which is the raw form of CAN.  When using these cheap devices you can't ask the CAN bus what the signal Bus_Voltage is, instead you need to perform a frame read, find the frame associated with the signal, then pull out the bits for that signal, then scale the signal based on the signal selected.
All of this is doable but a pain and can be very custom.  That's one reason NI came out with the Frame Channel Conversion Library.  This library converts from Frames to Channels using an industry standard CAN database file.  The problem with this library is it hasn't been updated in 5 years, and has known issues which likely will never be fixed.
NI has since come out with XNet which supports reading and writing signals on XNet hardware.  The XNet drivers also support converting Frames to Signals without needing hardware at all.  This conversion has several limitations, and really only works for getting the latest value for a signal, not all values.  And in addition to that if the signal was never seen, the value will be the defaul value for that signal, not NaN.
So I wrote a wrapper around the XNet conversion library to handle going from signals to frames, or from frames to signals.  Anyone looking to use a DBC file, on hardware that only supports frame API should use this conversion library, or at least use the XNet conversion sessions.
CAN Frame Signal Conversion Using XNet 
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

Hello Hooovahh,
Nice work  . It’s very useful.
I’m also converting CAN Raw data to Physical values in my project. Yes, your correct XNET APIs have some limitations. as you mentioned, there is one more limitation I found,
If your Message Data length (Payload) is 4 Bytes (example) and other CAN Frames are having more than 4 Bytes then its throwing Error (Error Code -1074384737).
While converting CAN Frames to signals, we will get different Payloads but, our selected signal message have 4 bytes then XNET will gives an error (at the time of Data Conversion).
As per attached Snap, My Signal is related to IDxBB and I’m sending two different Frames then XNET will not convert.
Hooovahh Wrote:
NI has since come out with XNet which supports reading and writing signals on XNet hardware.  The XNet drivers also support converting Frames to Signals without needing hardware at all.  This conversion has several limitations, and really only works for getting the latest value for a signal, not all values.  And in addition to that if the signal was never seen, the value will be the default value for that signal, not NaN.
When we will send Frame by Frame then we will get all values (not only recent values). XNET will take previous value (if data is not present for Next iteration)
Please check this snippet for all values & NaN Display.
Munna

Similar Messages

  • I can start a conversation with my number on imessage but i can't be reached with my number. How can I fix this?

    I can start a conversation with my number on imessage but i can't be reached with my number. How can I fix this?

    Go to Settings>Messages>Send & Receive, and make sure that your phone number is checked. If it is not, then scroll to the top of that same screen, click on your Apple ID, and sign out of Messages, and then back in again.
    Cheers,
    GB

  • TS3274 On my iPhone I can update the 3G signal strength by dialing *228 with Verison. Is there anyway I can update signal strength with my ipad.

    On my iPhone I can update the 3G signal strength by dialing *228 with Verizon. Is there anyway I can update signal strength with Verizon on my ipad?

    it does not really update your signal strenght, It disconnects you from network and reconnects you back. Termin is reprovisioning. Once your phone is reconnected it autmatically searches for the best cell on the closest tower. You can do the same by simply turning off your wifi radio (airplane mode off). As far as I know there is nothing on your ipad that will make them(verizon) to reprovision your account on their side.

  • Frame rate conversions with DVCPROHD

    Where can I get a decent, straight forward answers to questions on capturing HD material via Kona onto my FCP. I am mostly interested in frame rate conversion methods when capturing from AJ-HD1200A Panasonic deck via BNC. I have searched the web and have found limited answers. Apples pdf on DVCPROHD frame rate conversions do not address many glitches that pop up.
    Is there a web source on this. I'm not looking for a technical book or manual.
    I just need simple answers if possible.
    Please help.

    So...
    Is there a procedure to follow on the process of frame rate conversions, either with compressor or Natress, which I dont have btw.
    I have been capturing at 720p 59.94 as instructed on the manual by apple which comes with the FRC plug in. But have been having several problems. Too many to list.

  • CAN Frame Channel Conversion Library

    Hello, I am trying to use the attached ncd file to read from a Series 2 board via the Conversion library but it's not working. I can load the ncd in Max and it read the channel fine.
    What would cause this?
    I am using the sample vi USBCANBasicInput.vi. It seems imposible to debug because it uses a dll for everything.
    I am using version 1.0.3.
    There are extended CAN messages. 
    Thanks in advance,
    Dustin
    Solved!
    Go to Solution.
    Attachments:
    USBCANBasicInput.vi ‏44 KB
    atc.zip ‏1 KB

    Dustin,
    It was a pleasure speaking with you on the phone today.
    It seems that the problem was in using extended arbitration ID's with the Frame Channel Conversion Library. Here are some examples that show how to use this library with extended arb ID's.
    http://decibel.ni.com/content/docs/DOC-6793
    http://decibel.ni.com/content/docs/DOC-6792
    http://decibel.ni.com/content/docs/DOC-6055
    Regards
    Peter Flores
    Applications Engineer

  • CAN Frame to Channel Conversion Library

    Hi,
    Is it possible to use this DLL with CVI? If so, is there any example code or a user document?
    Cheers,
    John
    John C
    Solved!
    Go to Solution.

    Hi JGC
    Unfortunately this Library is only meant to be used from LV and LVRT, an equivalent Library does not exist in CVI.
    With that said, you may be able to dig into the LabVIEW VI's of the Frame Channel Conversion Library and pull the function prototypes from the Call Library Function Node on the block diagram of each one. With this information, you could call the functions from the dll (usually located here: C:\Program Files\National Instruments\NI-CAN\CAN Frame Channel Conversion Library 1.0.2\Drivers) from within C.
    Kind Regards
    Chris
    Chris | Applications Engineer NIUK

  • Frame Channel Conversion Library for LabwindowsCVI

    Could someone help me to identify Frame Channel Conversion Library for LabwindowsCVI. I found a library for labview and it is working fine with my USB8473. But i really need to get it working with Labwindows. Have anyone tried to access the frchconvlib.dll from labwindows? Thanks in advance.

    Unfortunately, the C API is not documented, nor is it stated as a supported interface.
    With that said, you may be able to dig into the VI's of the Frame Channel Conversion Library and pull the function prototypes from the Call Library Function Node on the block diagram of each one. With this information, you could call the functions from the dll (usually located here: C:\Program Files\National Instruments\NI-CAN\CAN Frame Channel Conversion Library 1.0.2\Drivers) from within C.
    Let me know your thoughts and if you have any success.
    Regards,
    Peter Flores
    Applications Engineer

  • Messages not allowing me to start conversations with text only recipient on iMac/MB

    I do not know if Messages is supposed to work this way - but right now I can't START conversations with someone who I have to SMS message (they are NOT a part of iCloud, etc.) from my computer (both running released Yosemite).
    The reason I say I'm not sure - is that I was part of the developer beta (even tried the public beta on one laptop when it was available) - and Messages has operated about 3 different ways during that time.  During the beta - I went from it working just like I thought it should, and in two weeks, lost some abilities, and by the start/middle of August I lost ALL ability to text SMS recipients prior to GD release of Yosemite.
    Wasn't able to initiate conversations with SMS recipients right after the GD release either.  Then a couple weeks after the GD release, it started working fine, and I COULD initiate SMS conversations on my computers.  Now in the last few days, I again can't initiate SMS messaging with SMS-only recipients on the computers.
    IF I START the SMS conversation using my phone or iPad, my computers will sync-up with the messages, and I can carry on a conversation using my computers, but can't initiate a conversation to an SMS-only recipient.  However, the "SMS" section on https://www.apple.com/osx/continuity/, indicates I'm supposed to be able to initiate SMS conversations by "clicking a phone number".  I think iCloud has been up and down, and between the iOS updates, etc. and iCloud issues/updates that it is causing problems.
    So - is this something that others are having issues with?  Is this just some temporary issue that's occurring until 10.10.1 or 8.1.x are released?  ????

    Thanks for all the replies! 
    I finally got time to go through a longer session dealing with the issue.  Wound up having to completely disable, then re-enable the affected systems on my iPhone.  Even though enabled - they simply would not work.  Had to disable on the iPhone, wait a while, then re-enable on the iPhone.

  • Advanced CAN Frame to Channel Conversion: Error with LV 8.5.1

    Hello!
    I´ve tried to read in a DBC-file with the "Advanced CAN Frame to Channel Conversion Example" on a LabVIEW 8.5.0 system and it works fine.
    On a LabVIEW 8.5.1 System I get the error:
    Scan From String (arg 6) in CAN FtoC Parse Channels and Mode.vi->CAN FtoC Parse CANdb Messages and Channels.vi->CAN Channel Data Import.vi
    Does anybody know a solution for this error?
    Thank you for your help,
    demo66
    regards,
    demo66

    Hi!
    It is a problem of localized decimal point.
    In a german Windows, LabVIEW will use Komma as decimal point.
    So the Scan From String.vi will convert string 0,21 in a double but not 0.21. From the file dbc you receive the values with period "." that's why it create the error 85.
    You have 2 possibilities: change the localized decimal point in LabVIEW (Tools -> Options) or you say to the Scan From String.vi to use "." as a decimal point.
    Go to CAN FtoC Parse Channels and Mode.vi and search the 2 Scan From String.vi
    Add at the beginning of the Format String %.; so that the format String will use the "." as decimal point (see Attachement).
    After that the example will work.
    Best regards
    Ken
    Attachments:
    Scan From String.jpg ‏51 KB

  • Deterministic CAN Frame to channel conversion

    Hi, I need to create a CAN logger which should record (in TDMS format) and show in real time (in a mixed signal graph) several channels in deterministic mode.
    Using an interface wich supports the Channel API (such as NI PXI-8464) it is all right and the software works properly.
    The problems appears when the aquisition is done through a NI USB 8473, doing the frame to channel conversion with the two virtual channels (CAN256 and  CAN257). The conversion is done in the way shown below:
    where in the CAN256 i transmit in "timestamped mode"
    While the time goes on, the logged signal is more and more delayed respect the real one until the buffer fills and an error is generated.
    What i need is a Frame to Channel conversion wich keeps deterministic, also with a small constant delay.
    Any solution?
    Thanks a lot
    Fabio

    Hello Fabio,
    Usign the virtual ports for frame to channel conversion is not very efficient.  I would suggest using the frame to channel conversion library.
    Let me know if you have any questions about it.  Have a great day.
    O. Proulx
    National Instruments
    www.ni.com/support

  • XNET Signal Conversion

    Hello all,
    Please help me on my VI.
    I want to read the more data from log file (i.e. >2GB) with read from notepad file( line by line) or spread sheet. This output I’m giving to CAN frame (with NI XNET).
    In NI XNET Convert.VI I’m getting last frame values (Signal data), so how can we get the all frame values with  time interval( for selected signals).
    My log file contains two types CAN networks, I want to read both .DBC files with NI XNET convert.VI and I need extract the data for selected signals .
    Please check my VI and give me your valuable suggestions.
    Thanks & Regards,
    Guru
    Munna
    Attachments:
    sample for CAN signal.zip ‏28 KB

    Hello all,
    Please help me on my VI.
    I want to read the more data from log file (i.e. >2GB) with read from notepad file( line by line) or spread sheet. This output I’m giving to CAN frame (with NI XNET).
    In NI XNET Convert.VI I’m getting last frame values (Signal data), so how can we get the all frame values with  time interval( for selected signals).
    My log file contains two types CAN networks, I want to read both .DBC files with NI XNET convert.VI and I need extract the data for selected signals .
    Please check my VI and give me your valuable suggestions.
    Thanks & Regards,
    Guru
    Munna
    Attachments:
    sample for CAN signal.zip ‏28 KB

  • Can only have audio conversations with other iChat AV 3.0 users

    so, since i updated my ancient powerbook to 10.4, i can no longer hold audio conversations with ANYONE other than people that have iChat AV. no one on aim, trillian, iChat under 3.0.
    through some digging, ive come to the conclusion that it's because my computer is outdated, slowly dying and bugging up and will be resolved when i eventually purchase a macBook. BUT, i quick fix or some information to do so would be amazing.
    please help!
    stuart

    so ive done some investigating. before having my cable modem up and running (speedstream 5400), i was using a wireless signal in the area. i don't know what it is, i just know it's slow haha. everything worked fine. once i switched to the faster modem, i can only chat with iChat AV 3.whatever users. it's not the operating system.
    i just switched from MY cable modem back to the wireless slow signal and everything works perfectly. so, what's the deal?
    help please.

  • XNET CAN frame queue overrun kills Read VI

    Hello, I am trying to read CAN frames via XNET. My problem seems to be connected to the queue of my Input session: If the queue gets bombed with random CAN messages from somewhere, the session property "Number of Values Pending" increases rapidly. That's ok, because my program calls XNET Flush before it starts using the bus itself. Otherwise my program would read the old queue content first and the expected reply frames later. This behaviour is ok and expected.
    But after I bombed the bus a little bit more so that the queue gets filled to maximal queue size (seems to be predefined as 1000), the Input session read operation will always timeout (tested with 1 second and more) and return an empty frame array. In this case the error wire is s to -1074384886 (timeout). The session always reports tranceiver state "Normal". Even the XNET Flush operation does not help, although it seems to empty the queue properly.
    summary: hitting the queue size limit with incoming CAN frames results in dead read operations.

    Hello pgraebel,
    In the screenshot you posted, NI-XNET will wait 0.1seconds for 1 frame to be present in the queue.  If there is less than 1 fram available, the VI will timeout.  That being said, I would guess that the timeout happens if you ask for many frames (close to the buffer limit), but the timeout is too small.  If you are trying to read 1000 frames, you may need to wait longer than 1 second for the frames to go on the bus.  That really depends on your bus timing/frame timing/etc.
    I made a small example to show you a little more how the buffers can be used in XNET.  You can set the buffer size and look at the unused spaces in both the read and write queue.  Let me know if it helps.
    O. Proulx
    National Instruments
    www.ni.com/support
    Attachments:
    CAN Frame Input Queued.vi ‏37 KB

  • My iPod touch 4th gen. Keeps giving me the error message "cannot connect to the app store when I sign in. I can open the app store and browse it but I can't download anything. I have full signal strength with my wi-fi and safari is working perfect.

    My iPod touch 4th gen. Keeps giving me the error message "cannot connect to the app store when I sign in. I can open the app store and browse it but I can't download anything. I have full signal strength with my wi-fi and safari is working perfect. I turned it off and restarted it 3 times now. I have an iPad 2 and the app store works flawlessly with it. What is going on?

    Same here on my lpad2. Can access the web just fine from browsers but cannot install new apps or updates in appl store.  Seeing a few others reporting same issue tonight so likely an apple server issue and staff will notice it in network monitors and fix it...sometime this weekend.
    Rob

  • How can you remove old conversations from the iMac. Even when I remove them they return when I start a new conversation with the same person. Only happens on iMac with the Beta iMessage program

    How do you remove an old conversation using  the Beta iMessage on an iMac. When I open a new conversation with the same person the old conversation comes back

    Hi,
    Previously iChat had tried a Last Chat/IM option when using Saved Transcripts - which itself was an option.
    iChat has also tried "Saving" the Last Chat by leaving a Chat window open and using something similar to the Lion method of showing an app in the state is was closed in.
    In Messages the option to Save Transcripts has been removed and Chats or all types are saved as a matter of course.
    What this tends to mean for your iChat style Buddy Chats is that it opens all the Transcripts  for that buddy as a sort of History you can scroll back through if you want  (I have  some Buddies with saved chats gong back to 2004)
    With the Syncing of iMessages with iPhones and iPads (or Touches) then it seems this works slightly differently.
    Although you can delete the chat and the contents of the Chat as separate action it is true that in the Beta as soon as you connect to the same Contact that the contents of the previous chats are shown to you.
    I have found that Messages stores a data base of info on iMessages in Your Home Folder/Library/Messages
    I have found that deleting this chat-db removes the "History" that keep popping up.
    By default the Saved "iChats" are also stored in the Home Folder/Documents/iChats (At least this is the default place iChat used and they go to the same iChats folder where ever you had it)
    Some people claim removing iMessages saved here stops the "History" reappearing.
    In Lion the only access to the Home Folder/Library is via the Finder's Go Menu and hiding down the ALT key
    10:00 PM      Sunday; June 10, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.4)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.7.4),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for

  • File not found error

    I get the following error, but don't know why it can't find the file. Is there anything in this script that would call "\" instead of "/"? Is there any line of code that will switch a wayward "\" back? 01-09-24 09:37:02 - path="" :jsp: init 2001-09-2

  • Lost Boot Camp partition after upgrading to OS X Mavericks

    History: I had Windows 8 installed on Boot Camp. For some reason I had to enable Bit Locker in Windows that required me to create a partition using Windows Disk Utility. The Windows Disk Utility created the partition but then there was mismatch betwe

  • Had operational Goflex - plugged in USB WD MyBook, cannot boot & no IP

    Hello Archers! Situation; Arch Linux Seagate Goflex Home (SG-GFH) was fully operational but now not getting IP address after plugging in USB Western Digital My Book Essentials (USB-WD-MBE) and restarting. Environment; 1 NetGear WND3700 v2 router. 1 L

  • Suggestions for New Battery for 13-inch MacBook

    I have been having trouble with my battery for a long time now. Often the computer fails to recognize the battery at all and will turn off when unplugged from the adapter (which is also acting screwy, but that's a different story). I having been usin

  • Is there a tutorial for layers for dummies

    I have been messing with ps for a long time but avoiding anything to do with layers...I guess it is time to learn...Is there an easy way to learn layers  ie making a layer, saving a layer, editing layers ...in my advancing years we have to go slow..S