CAN message availabili​ty

I am currently writing an application (LV8.2) for battery pack testing. The application checks communication with a BMI, and communication to the battery is over CAN. I use two CAN cards on the test PC and the Channel API subVIs to read and write from and to the CAN-bus. Reading and writing happens at a specific rate and it works just fine.
The problem I have, is that I can’t determine when a message is not present anymore.
For example the BMI sends out a CAN message periodically that I read from the CAN bus. Suddenly the BMI crashes and stops to send out the message, but I wont recognize. Has one of you an idea for a method to determine the presence of a message?
I know that’s a tough one, but thanks for your help…
SDFlow

Hi SDFlow,
Three options come to mind:
When using the Channel API with a sampled (periodic) read, you can use error out terminal to determine whether a new message has been received since the previous call to CAN Read.vi (or CAN Start.vi). If no message has been received, the warning code 3FF62009 hex is returned in error out. If a new message has been received, the success code 0 is returned in error out.
You could use the Channel API with a timestamped read (mode Single-Chan Multi-Samp 1D Time & Dbl or Multi-Chan Multi-Samp 2D Time & Dbl) and have your code inspect the timestamps.
You could use the Frame API and configure a CAN Object for receiving a frame (Communication Type: Receive Unsolicited) and specify the desired timeout as the 'Period' value of the configuration cluster. In the Receive Unsolicited mode, the 'Period' will be treated as a timeout and the ncReadObj.vi will return a timeout error if no frame of that particular ID was received in the given time.
Note: The CAN Object is 'per-CAN ID'. Thus, if you are interested in monitoring multiple different frames with different IDs, you need to configure a CAN Object for each CAN ID.
-B2k

Similar Messages

  • How do you schedule an email to be sent at a later time?  Also, canned messaging shortcuts in Apple Mail?

    I have heard rumors that this is doable using Automator and iCal.  I have also heard rumors that Apple Scripts are the way to go and I have found a few online (likely from 17 year olds in their basements) -- I must admit, I'm a little leary about copying and pasting a script into my computer.  I'd much rather have detailed instructions on how to set it up myself.
    I would be most grateful for some help with this!
    Thank you!!
    P.S. Also, if anyone knows if there is a way to use shortcuts in Apple Mail to trigger canned messaging I'd appreciate it.  You can do this with the iPhone (ex: you can set it up so that when you type CB in the text field, it says "I'll have to call you back" or whatever you want it to say).

    +1
    Scheduling an email is a deeply important productivity feature that I really hope Apple can incorporate into the next update of Mail.

  • How do I update CAN messages being transmitted as a periodic waveform?

    I am using NI-CAN 1.5 to transmit CAN messages with a CAN Object using the "Transmit Periodic Waveform" communication type. The CAN card I am using is a dual port PXI-8461.
    I wish to update the waveform message(s) but am running into problems. I configure the CAN Object with a write buffer size of 2 and then start transmitting 2 messages with one message going out every 500ms. These 2 messages are correctly getting placed on the bus. To update the messages, I successfully stop the CAN Object and attempt to write new data into the write buffer. This is where I am running into problems. The ncWrite VI is failing with an error of 0xBFF62008 (Write Queue Overflow).
    Upon further
    inspection, I noticed that when I stopped the Object and there was only 1 of 2 messages pending, I could successfully write one time; however, the second write would fail with the same error. If 2 messages were pending, neither write would be successful. I need to be able to update both messages. I thought maybe I could use the ncWait VI to wait for the write queue to empty and then write in 2 new messages; however, this will not work since the ncWait VI never returns before a timeout occurs in "Transmit Periodic Waveform" communication type. Either 2 or 1 messages are always pending so it never sees that the card is ready for new data.
    I looked in the Programmer's Reference Manual, and this is the procedure recommended. (A bit different, but I tried it and came up with the same results.) The Reference Manual claims ncWrite replaces the oldest data in the queue on page 3-30, but on page 2-40 it says ncWrite returns an error when called on a full queue.
    Does anyone see anyt
    hing that I'm doing wrong or have an alternate way to accomplish what I want? Thanks for your help.

    The "Transmit Periodic Waveform" section (pg 3-30) of the NI-CAN Programmer's Reference states, "Use this configuration to transmit a fixed sequence of CAN data frames over and over, one CAN data frame every period."
    The words "fixed sequence" denote that it was not intended to change as the program runs. I appolgize if this was not clear. Any suggestions for improvement to the documentation can be emailed to [email protected]
    If those two data sets do not change at run-time, they could be merged together. For example, make the buffer the size of both data sets added together. Start by Writing the first element of set one, then the first element of set two, then the second element of set one, then the second element of set two, etc.
    Randy Solomonson
    Application Engineer
    National Instruments

  • Dynamically change CAN message payload length in XNET

    It took me a while to figure out that when I send 4 bytes into the nxWriteFrame routine when it's defined as an 8 byte message in the DBC, that the message never makes it onto the bus.  Is there a way to dynamically change the payload length of a CAN message at runtime without stopping and starting the session again?

    Hi KavehV,
    It is possible to dynamically change the payload lengthduring RunTime but not without starting and stopping the session. In fact, all changes to the payload length, when done dynamically, is done to the copy of the database in memory as opposed to the one on disk, so whenever your application stops running, the changes are discarded. If you need to change the payload length, you would need to essentially do so before you create a session by opening the database, and modifying the copy that's in memory.
    Raj
    National Instruments
    Applications Engineer

  • Hardware functional​, but CAN messages not received by PC

    I recently moved a desktop CAN card from my office to a computer in the lab to replace a slow laptop. The laptop has a PCMCIA CAN card and communicates properly over the CAN bus. I installed LabWindows v6.0, then installed NI-CAN v2.2, shut down the desktop, installed the PCI card, booted up, the auto-hardware install ran. Using MAX, I did a self-test, which passed, but when I boot up the tool on the other end of the CAN bus, the bus spy on MAX does not register any CAN messages. The card previously worked on my office desktop and the tool communicates properly with the laptop. I tried uninstalling everything and reinstalling using a different PCI slot in the desktop but it is still non-functional. I also checked the connection cable but it is working properly. I am installing the latest NI-CAN update v2.3, which is the newest version compatible with my v6.0 of CVI, but doubt this will solve the problem as I was running the old version of NI-CAN on the laptop and it functioned correctly. I am all out of ideas...

    Hi,
    Could that be a problem with the baud rate? The Channel API and the tools in MAX (e.g. the BusMonitor/bus spy) use the default baud rate that is set in MAX (right-click on the CAN port » Properties). When NI-CAN gets installed (and there is no existing version of NI-CAN found on the system), the default baud rate is set to 125 kbaud, however, you might have changed that on your office desktop to a different value.
    This does not apply, if you use the Frame API as you have to explicitly set the baud rate when calling ncConfig.
    -B2k

  • Support of automatica​lly sending of cyclic CAN messages added in wrapper for LabView 8.5 and 8.6

    hi,
    I am using usb can module systec for sending/receiving  can messages to device using third party dll.
    without using dll can i read/write can messages using labview?
    thanks

    Hello,
    It sounds like you are using a third party
    USB-CAN device. In order to use this device in LabVIEW, you must make
    those dll calls unless there are LabVIEW drivers or libraries available.
    Even the NI-CAN drivers used for National Instrument CAN devices are just wrappers around dll calls.
     Hope this helps.
    Peter Flores
    Applications Engineer

  • How to transmit can message with extended id using Vcand32 dll from vector cancardx?

       Iam trying to transmit can message with  extended id through vector can card, data is received properly, but message id is not proper, only 11 bits of message id is visible in pcan tool.

    The thing is, the whole point of having separate accounts is to keep your data seprate from hers. So, any attempt to overcome this can be kludgy.
    For iPhoto 09 (version 8.0.2) and later:
    What you mean by 'share'.
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    If you want the other user to have the same access to the library as you: to be able to add, edit, organise, keyword etc.
    Quit iPhoto in both accounts. Move the Library to the Users / Shared Folder. (I would note that some Lion users are finding Permissions issues with this.)
    (You can also use an external HD set to ignore permissions, a Disk Image or even partition your Hard Disk.)
    In each account in turn: Double click on the Library to open it. (You may be asked to repair the Library Permissions.) From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.

  • Have problem in transmitting the CAN message in FPGA

    Hi
    I have deloped a .vi which is deployed over FPGA.
    The VI is having one while loop and inside the while loop I am accessing CAN9853 module(FPGA IO).
    I am sending one CAN frame to this module for each iteration of the loop.
    When I run that VI (Interectively) I can see all CAN message over BUS monitor(USB to CAN connected to 9853(CAN0)).
    The problem is we are not able to see more than 2 CAN frame when the FPGA vi is made as run as startup.
    Kindly help.. Is there any settings need to be done.

    I think you better take you phone to nokia carepoint, they'll help you with this issue !!!!
    NOKIA N73, NOKIA 7250i, NOKIA 1100

  • How to synchronize NI-CAN, NI-6601, and NI-6052E on CAN message?

    Hello,
    I am trying in LV6.1 to collect measurements triggered from a CAN message, being received at 1kHz for < 1 minute.
    The measurements I am looking to collect are:
    1. The measurement data contained in the CAN message.
    2. The analogue data from channel 1 on the 6052E
    3. Two X4 encoder measurements on the 6601.
    Is there any example that shows how to do this kind of problem with multiple boards for 1kHz logging in sync?
    Regards,
    Peter

    Hey Peter,
    There are a few CAN examples that ship with LabVIEW that should be able to get you started. They should be broken down to the channel and frame API. I would probably use the frame API for your application.
    The DAQ-AI CAN-Receive Example.vi example shows how to route the signal from the CAN device so that when a message is received it will scan the analog input. You could modify this example so that the RTSI line is also routed to the gate of your counter. If you perform a buffered position measurement with the gate being routed from the RTSI it will then sample the counter register at the same time the analog input is read.
    I hope this helps out.
    Joshua Prewitt
    Application Engineering
    National Instruments

  • I am using systec usbmodule1 to send and receive CAN messages , is any one have tried this in labview?, if yes can you send me the code thanks

    i am using systec usbmodule1 to send and receive CAN messages , is any one have tried this in labview?, if yes can you send me the code
    thanks
    Solved!
    Go to Solution.

    Hey,
     All of our CAN drivers have been written for National Instruments' CAN hardware (referenced here : http://digital.ni.com/public.nsf/allkb/E2C6ED025C7​98C5586256F4E00520448 ). Thus, you will have to code all your communication manually, unless Systec provides a LabVIEW driver. There might be various dll files that Systec provides for communication, which you will be able to access through LabVIEW. Take a look at the Call Library Function Node, which can be found from the Functions Palette under Connectivity -> Libraries & Executables. Here you can call a dll file, and also the individual functions within that dll.
    I would suggest posting your question either to the LabVIEW forum, as previously mentioned, or to the CAN forum found here : http://forums.ni.com/ni/board?board.id=30
    Justin E
    National Instruments R&D

  • Can messages accidently deleted be retrieved?

    can messages accidently deleted be retrieved?

    Yes, the only way is to restore your phone from your icloud or itunes backup, if those message were included in the backup.

  • How can I get my CAN message data seperated?

    Ok, I am using the example filter given by NI to filter my CAN messages down to a certain arbitration ID.  There are several messages displayed still on this same ID.  I really need to get one message out of all of them.  I have seperated the data in to a for loop to try and narrow it down even more.  But the biggest issue is the fact that I need to get it down to one sigle array of data and still filter out the rest, so that I may compare this and find out if I have the right message.  Thanks

    Hello,
    If you are using a standard ID, you can change the comparator and mask in to filter the messages based on the first 2 data bytes.  If you are using an extended ID, or the data is not in the first 2 bytes, you can loop through the array and unbundle each element to extract the data.  Once you have the data you can convert it into a boolean array and extract certain bits that can be then converted back into a number.  This number can be used as the selector for a case structure.  Create a case for any of the data you would like to process and use a Default case to ignore the rest.  
    Caleb WNational Instruments

  • CAN message manipulation

    Hi All,
    I'm new to LabView and i'm finding it extremely challenging, mainly due to data types.
    Firstly I need my project to save all CAN messages.
    Secondly I need to inspect the ArbitationID and act on it accordingly (some resulting in a CAN write)
    Then I need to file the data accordingly and show some data on the GUI
    Usign the single read I can convert the CAN message inc timestamp to a string and save it but if i try and convert it to a cluster for manipulatuion all I get is the 8 bytes of data
    If I use the multi CAN read I can't break the 5 elements within a cluster within an array down to save the message
    Any thoughts?
    Solved!
    Go to Solution.

    I've seen much worst code, but you are making several mistakes that I think make things more difficult.
    When you perform the read your output is an array of frames.  Each Frame is a cluster of 5 things, Timestamp, ArbID, IsRemote, Data Length, and the Data.  The Array to Cluster function you are using is not the one you should use.  That will take an array and turn it into clusters, but you must define the size and it defaults to 9, so what happens if you get 10 frames in a read?  The last one is lost for ever.  All reads that read more then 9 frames will lose the ones after the 9th.  Additionally what happens if you have no frames?  Well it converts it into 9 frames that are blank, but you go and log those anyway.
    What you really need to do is process each frame one at a time, looking at the output and then deciding what to do.  This can easily be done in a For loop.  A For loop will pull out each frame one at a time and allow you do do stuff with it and manipulate it in a way that makes sense, or conditionally log different data to different files.  
    Attached is an edited version that will process each frame, and depending on the ArbID will write to one of 3 files.  If the ArbID is between 0 and 0x12 it goes to one file, from 0x13 through 0x200 it goes to another, and then all other frames go to a 3rd file.  I also updated the format into the file to be a little cleaner and I think it will contain the same information in a tab delimeted file.  This is of course an example I have no idea what you really need your program to do.
    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.
    Attachments:
    CAN_MultiRead2 Hooovahh Edit.vi ‏43 KB

  • Wrong period of CAN message when using veristand

        I use Veristand. The period of CAN message is set to 10ms and the other is 100ms. After loading the project into PXI platform, the real transmission period is different. There are no rules about the period. The baud rate of CAN is 250Kb/s. And the real period of CAN message is monitored by Kavasar.
        Is there any body, who has faced with this problem?

    Real time processor is "PXIe-8135". CAN board is "PXI-8513/2". High speed can and 250Kb/s is used. Karvasar works well and is validated by other CAN instrument.

  • Can message, but no calls.

    Hey guys, I can message my buddies, but can not make any calls to them. The call and video icons are all grey. Why is that? Thanks.

    Have you checked the Show Video and Show Audio Status items in the iChat > View menu ?
    If say you have five Buddies it means they are all busy chatting to someone else.
    Pale green icons means they are busy.
    5:21 PM Saturday; May 24, 2008

Maybe you are looking for

  • The Add-ons Manager will not display!

    I've been having an intermittent problem with certain features not displaying at all. First it was that I could not "Customize" my toolbar for quite a while. It finally returned suddenly, in FF v4.01, after being unavailable since v3.5. I've also bee

  • LCD screen iMac

    Sorry if posting this topic here offends anyone but I was at a bit of a loss just where to post this query. It relates to cleaning the frequent smudges I seem to accumulate on my LCD screen. I checked at my local Apple shop who wanted me to pay an ex

  • Ipad mini permanent lines

    I had My ipad Mini 64gb for xmas present from my friend and my friend bought this in South Korea when he went there for work. Now my ipad mini has recently started showing a line 3/4 of the way down the screen just to the right side only. the block i

  • HT4061 MY IPAD 2 IS DISABLED

    how do I enable my disabled ipad

  • Stitching: Aperture 3 and Microsoft ICE

    Hi forum members. I recently switched from Aperture 2 to 3. I use Microsoft ICE for stitching panaromas. Before i can use ICE for stitching, I have to export my Canon CR2-RAW-files to jpeg. Stitching worked well with the exports from Aperture 2 but n