NI-CAN Frame API: Variable Periodic CAN Object

Hi,
I am developing an application that send CAN messages with NI-CAN Frame API.
Some of my messages have specification of variable periodic where
- On idle, NI-CAN will periodically send the message at 100ms period of last message
- On a user input, it will send at period of 10ms for short period (200ms) and back to idle.
In CAN Object Configuration, as I put period to 100ms, The idle data is correct but when I need to send the user input, the data is sent using the period of 100ms as well. If I put period to 10ms, even during idle data, the message are sent every 10ms.
If I configure the CAN Object's communication type to transmit data by call, the data is only sent once and not periodic.
Does the NI-CAN Frame API supports variable periodic CAN Object?
Is there suggested way to have such a message?
- Meadow -
LabVIEW 7.0 - 2011, Vision, RT, FPGA
TestStand 3.0 - 4.5

Hello,
In general, a clear function will flush all data associated to a task. Have you tried using nctClear()? Although this is a legacy driver so that may not be the case…I found this article that explains how to reset the device (same functions are available in the C API, see manual) which can help but according to this thread is not a 100% effective due to its limitations. Nevertheless, is better than nothing.
I hope this helps
Alejandro | Academic Program Engineer | National Instruments

Similar Messages

  • CAN periodic transmit message with different modes using Frame API's

    I want to transmit a CAN message periodically using Frame API's. I am able to send messages which dont have modes inside the message. For some messages having multiplexer in ".ncd " files and inside that multiplexer having different modes. Now in order to send all the modes of that message periodically by configuring them once by using Frame API's i did not  find a way. I am able to send messages but the last updated mode is only sent periodically. Is there any way that CAN message having different modes can be sent periodically, updating all modes periodically automatically using Frame API's.

    Hello Kpraveen,
    You could set the period for N*Period, N being the number of modes.  You just need to make sure your application changes the modes fast enough to update each periodic frame.
    For example, say you have 2 modes and the frame's period should be 10ms.  That means that you would like that frame to go out twice every 10ms, updating mode 1 and then mode 2.  So, that means that the frames period can be 5ms. 
    1.  It will start by updating mode1
    2.  5ms later, it will update mode2
    3.  5ms later it will update mode1 again
    mode 1 really has a  period of 10ms...
    You just have to make sure that you can update the frame fast enough, or switch between modes fast enough, or you will send the same mode twice.
    Let me know if this helps, or if I an not understanding this properly.  Have a great day.
    O. Proulx
    National Instruments
    www.ni.com/support

  • Filtering can frames with frame api (part 1)

    Hello,
    I have problems to understand the filter techniques in the frame api for C/C++.
    My current structure is as follows:
    - I have a NI CAN Card (Series 2 HW, Philips SAJ 1000 Contoller, 1 CAN Interface (CAN0))
    - On the CAN BUS Interface one target device is connected (it is a controlling unit for a sliding gate, automotive)
    - I 've created 2 CAN Network Interface Objects, one for receiving, another for transmitting frames
    - all received Frames from the target (incomming frames) are handled by the receiving Object.
    - its configuration is as follows:
    m_attrList[0] =       NC_ATTR_BAUD_RATE;
                m_valueList[0] =    83333; //CC.NC_BAUD_100K;
    m_attrList[1] =      
    NC_ATTR_START_ON_OPEN;
                m_valueList[1] =    NC_TRUE;
    m_attrList[2] =       NC_ATTR_READ_Q_LEN;
    m_valueList[2] =    0; //number of frames (not bytes!)
    m_attrList[3] =       NC_ATTR_WRITE_Q_LEN;
                m_valueList[3] =    0;
    m_attrList[4] =       NC_ATTR_COMP_STD;
    m_valueList[4] =    NC_CAN_ARBID_NONE; //handle all
    frames that are not handled trough CANObjects
    //CC.NC_MASK_STD_DONTCARE;//0x791;
    m_attrList[5] =       NC_ATTR_MASK_STD;
    m_valueList[5] =    NC_MASK_STD_DONTCARE;//0x791;
    m_attrList[6] =       NC_ATTR_COMP_XTD;
                m_valueList[6] =    NC_MASK_XTD_DONTCARE;
    m_attrList[7] =       NC_ATTR_MASK_XTD;
                m_valueList[7] =    NC_MASK_XTD_DONTCARE;
    - opening it as follows:
                iStatus = ncConfig("CAN0", 8, m_attrList, m_valueList);
                iStatus = ncOpenObject("CAN0", objRXHandle);
    - I 've configured it with ncCreateNotification(objRXHandle,...), so on any received frame a callback is invoked.
    - no remote frames are used, since the target doesn't support them.
    - similarly I've defined the transmitting Object, but not opened it,
    because I do the transmitting via CANObjects (one per ArbID)
    - frames are only received after a command is written to the target
    (calling ncWrite(...)) within a manufcturer specific frame for a
    CANObject
    - up to now all fine
    - now I want a filter mechanism wich allows me to define a list of ArbIDs that must not be processed
    - my intention was to define the attribute and value of the receiving CAN Network Interface Object (as mentioned above):
    (...please continue on part 2)

    for answer see part 2
    DirkW
    Message Edited by DirkW on 01-10-2006 04:01 PM

  • Can two frames use the same SessionInfo object?

    Hi,
    I have some questions on using InfoBus Frame.
    Do parent frame and child frame HAVE TO make use the same
    SessionInfo object?
    I tried to show Master table and Detailed table in seperate
    frame without login twice. I am lucky it works since I happened
    to make two frames have the same SessionInfo object which is
    sessionInfo1 and conmment out sessionInfo1.publishSession()in
    Detailed frame.
    But when I tried to pass Master frame SessionInfo object to
    Detailed frame there is nothing showing up in the detailed frame
    it is just blank frame.
    So two frames have to use the same SessionInfo object . Dose it
    make sense?
    I would really appreciate anyone who can enlighten me on this
    subject.
    Thanks you so much for the attention.
    Julie Chi
    null

    Gopal (guest) wrote:
    : HI,
    : Julie Chi (guest) wrote:
    : : So two frames have to use the same SessionInfo object . Dose
    it
    : : make sense?
    : Yes, if you are working with a master details relation, data
    for
    : both need to be fetched from the same oracle session. So both
    ur
    : frames need to refer the same session. If u refer the detail
    : frame to a different session, u will not see any data, because
    : the information comes from a different oracle session which is
    : not aware of the master data that is fetched. I think it is
    : clear.
    : regards,
    : --Gopal
    1.Use wizard and test the frame
    2.pass the sessioninfo object in parent to child(put method in
    child, call from parent e.g ..getsessionInfo(SessionInfo ss)
    3.pass the sessioninfo object to rowsetinfo in child
    4.add Database authentication (username/password is sufficient)
    methods right before publish method
    *publish activates RowSetInfo and connects to db
    5.add methods in parent to call child
    That should work though depending on how you have set up your
    wizard generated java form, might tweak
    Thanks
    iggy de iguana
    null

  • How can I assign a hard coded value to a variable of type OBJECT.

    Hi,
       I have to call the following method
                                      lc_action_execute->get_ref_object(
                                                            exporting
                                                                  io_appl_object = io_appl_object
                                                            importing
                                                                   ev_guid_ref    = lv_guid_ref.
    Now I have to hard code the io_appl_object variable (of type OBJECT) to test my application for the time being. How can I assign a value to the variable? Is there any way to do that?

    I wouldn't use WDR_CONTEXT_ATTR_VALUE_LISTGEN.  Use wdr_context_attr_value_list instead:
    data l_topics type zpm_main_topic_tbl.
      l_topics = wd_assist->read_all_topics( ).
      data lt_valueset type wdr_context_attr_value_list.
      field-symbols <wa_topic> like line of l_topics.
      field-symbols <wa_vs>  like line of lt_valueset.
      loop at l_topics assigning <wa_topic>.
        append initial line to lt_valueset assigning <wa_vs>.
        <wa_vs>-value = <wa_topic>-main_topic.
        <wa_vs>-text  = <wa_topic>-main_topic_desc.
      endloop.
      data lo_nd_meeting type ref to if_wd_context_node.
    * navigate from <CONTEXT> to <MEETING> via lead selection
      lo_nd_meeting = wd_context->get_child_node( name = wd_this->wdctx_meeting ).
      data lo_node_info type ref to if_wd_context_node_info.
      lo_node_info = lo_nd_meeting->get_node_info( ).
      lo_node_info->set_attribute_value_set(
         name = 'MAIN_TOPIC'
         value_set = lt_valueset ).

  • Can you monitor signals using frame api on a PDA?

    Hi all
    I'm pretty new to LV all together, but I'm working on writing a program to monitor information off our CAN network, like oil pump speed, water temp, batt voltage, etc.  Is there a way to monitor these signals using the frame api, opposed to channel api, and display them continuously on a gauge/meter?  Since I'm using PDA module, I have to use the frame api, and not channel.  Frame api seems a little more vague to me than channel api.  Any advice or tips are welcome.
    Also on a side note, I copied/pasted a tab that i changed the background color to yellow from a windows targeted program to a PocketPC one.  The tabs stayed yellow when I built and transfered the .exe to the pda, but i don't have any control now on its color because PDA module doesn't have Property Nodes.  Every now and then, the tabs will go to default grey, and i have to undo the changes to get it back to yellow.  Is there some way to control the color?  I don't think the Change Control Color works in this case.
    Thanks ahead for any comments and advice.

    ....By the way, i'm using a PCMCIA-CAN/2 (HS) card on a PDA running WinCE5.0 and soon to be one running WinCE4.2...

  • "Baud Rate" AttrId not found for CAN frame API's ncGetAttr and ncSetAttr

    Hi,
    Well, everything is in the Subject : "Baud Rate" AttrId not found for CAN frame API's ncGetAttr and ncSetAttr
    Although it is listed in the LabVIEW Documentation,  it is not in the enum's items gotten from `right click` -> `create` -> `contsant` on their `AttrId` connector.
    My actuall need would be for checking a formerly opened CANNet handle compatibility against hardware  requirement, so ... ncGetAttr.vi
    Anyway, if somebody knows the actual u32 to hardwire instead of the enum constant, or did I get something wrong ?
    Thanks

    Hello,
    You are quite right about the ncGetAttr.vi however the ncSetAttr does have a Baud Rate item if you scroll further down.
    To get the Baud Rate wire a x80000007 to the AttrId pin. Or you can double click on the the ncSetAttr and then go into its block diagram, now
    in the case structure select case 27 copy the numeric constant (which should be x80000007) and use it as the input to the ncGetAttr
    Let us know if this helps.
    Christian A
    National Instruments
    Applications Engineer

  • CAN frame API with two buses

    Hi,
    I'm using a PXI 8461 to control 2 CAN-bus lines.
    When I start the bus monitor in MAX, both work correctly (frames are coming in).
    But I wasted a day now to try to make both lines work in my app.
    I'm calling ncConfigCANNet.vi and ncOpen first with CAN0, then with CAN1.  ncOpen with CAN0 gives me an objHandle, but when I cann ncOpen with CAN1 after that, I get objHandle=0 but no error!
    (I not using error inputs)
    So in my app CAN0 is running, CAN1 will eventually return an error when I try to read from it using the objHandle (with is 0).
    I even tried to use the NI-example "Multiple CAN Cards Frame API Single DAQmx Card Input.vi" with the same effect.
    Is there a known issue about that?
    I'm using
    NI-CAN  2.7.2f2
    LV 8.5.1
    PXI8461 with CAN0 and CAN1 working with the MAX busmonitor
    100g Ritter Sport Chocolate per hour
    -DB
    Solved!
    Go to Solution.

    If you look at this vi from the NI-examples:
    Multiple CAN Cards Frame API Single DAQmx Card Input.vi
    this is what I'm doing. As I said, this example is behaving the same way as my program. CAN0 responds, CAN1 doesn't.
    MAX is closed. And even if there was some other program allocating CAN1 there should be an error. But ncOpen runs without error and still returns null. Just like calling it with an error on the "Error In" terminal... but I have no error there.
    I even tried the low-level / depreciated ncReset.vi. No luck.
    One more thing I don't understand is why ncOpen.vi is reentrant and  all the other VIs from the nican.llb are not. In the end they are all calling nican.dll.
    Any ideas?
    -DB

  • Is NI-CAN v2.3 & NI PCI-CAN/XS2 with Frame API Thread Safe?

    Hi, I'm downloading a file from the host computer to the modules. When I downloaded the data to the four module at the same time (with 4 threads), I'm getting communication failure ~ 20% of the time. When I synchronized the software, so it will download two modules at a time (using one port from each card at a time). The communication failure disappeared. I just wonder if the NI-CAN software & PCI-CAN/XS2 are thread-safe. I'd appreciate if anyone have any suggestion.
    Information of the software & hardware
    - Computer: Pentium4 2.8GHz, 512M Ram
    - OS: Windows 2000
    - Development Tool: Borland C++ Builder v5
    - NI-CAN v2.3 - The application is using Frame API
    - PCI-CAN/XS2 (SW-Selectable CAN, 2 Ports)
    - CAN bus: 500k High Speed
    Thanks
    Eric

    The NI-CAN software does support threads. What's the specific error
    you're getting that 20% of the time? It may be due to something besides
    the multi-threading.
    Regards,
    Matt S.
    LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.

  • CAN Channel to Frame API

    Hi All,
    In a bit of a jam...we're using CAN channel api to manage a few functions of a piece of hardware thats on a CAN bus.  Works great. Code is attached as a picture.
    We are duplicating the system and have loaded the entire PC up and had to resort to a USB based CAN card that doesn't support channel API.  Yeah bad.
    I found NI provides something called the " CAN Frame Channel Conversion Library 1.0.2" and have been trying to get it to work.  I'm not getting any results though...does anyone else have experience with this?  Is it possible to modify all our vi's that are CAN based like the one attached?
    Talk to me like a little kid on this one, CAN at frame level is completely new to me.
    I am able to watch all the data on the bus via MAX and the bus monitor, so I thought this would be more a labview board type question.
    Thanks!
    LV7.1, LV8.5
    Attachments:
    CANHelp.PNG ‏18 KB

    Hi 
    I didn't know there is a genuine conversion library  
    I've been recently doing some work as vacation replacement for a colleague that had a CAN interface for a data logger.
    Since the channel API is relatively slow the concept was to log everything in frame API and later convert it to channel by passing it through a virtual CAN bus. This is provided by NI at "ports" 255 and 254 or something like that. You should check the help docu which is not too bad.
    The only caveat was that the simulated CAN does by default also simulate delays and transmission time on the bus, you have to explicitly set this to no or zero or something. On TX and RX this works differently one is a property node the other a method. and you have to be precise with the sequence of doing what.
    But in the end it worked.
    Unfortunately the program is now on the customer's PC. So I cannot be any more precise on the how-to-dos.
    I hope it helped just a bit
    Gabi
    7.1 -- 2013
    CLA

  • Where can I find the Frame API for CAN

    Hello,
        I'm fairly new to labview and working with CAN Buses. I am trying to read messages from a CAN Bus. I downloaded some examples from the web site, and I ran the programs, but it seems like I am missing a bunch of VI files for example, "ncConfigCANNet.vi" or "ncOpen.vi", all of which are part of the Frame API. I am wondering, where I can get these files, as I have been searching all over the web only to find nothing. 
     Thank you very much for any responses!
    Solved!
    Go to Solution.

    Have you installed the NI-XNET driver ? If yes, have you checked the NI-XNET Compatibility Library for NI-CAN ?
    See here for more details.
    These VIs will also be installed by the NI-CAN driver.

  • 847x USB-CANにおけるFrame APIのサポート内容

     USB CANインターフェース USB-8473 と Frame API for C を使用してプログラミングしていますが、まだ対向デバイスがないので実地にいろいろと確認できない状況です。
    http://digital.ni.com/public.nsf/allkb/E1A44077DA6C819186257288006B76D7
    上記ページに847xでのFrame API 制約等の記述がありますが、関数名等が NI-CAN Hardware and Software Manual Capter11 と一致しておりません。少し内容が古いのかとも思われますが、現行2.5に一致するものをご紹介いただけたらと思います。
    基本的には、ネットワークオブジェクトのサポートだけで、CANオブジェクトはサポートしていないと理解しておりますが、細部に関して自信が持てずにおります。
    1)
    ncConfig() で指定可能なパラメータがボーレートとStartAtOpenの二者のみとのことですが、例えば NCATTR_WRITE_Q_LEN は、なにかデフォルト値が適用されるということでしょうか?
    ncWriteMultはタイプスタンプ以外使用可能と思いますが。
    2)
    ncCreateNotification() は制約無しでしょうか?
    3)
    ncWaitForState() は、現在でもncRead/WriteMult() をサポートしていないのでしょうか?
    以上、USB-CANに関する質問です。

    平素よりNI製品をご利用頂きまして誠に有難うございます。
    日本ナショナルインスツルメンツ技術部の宮本と申します。
    お問い合わせの件に関しまして以下の通り回答いたします。
    ご投稿いただいたリンク先の関数名がNI-CAN Hardware and Software Manualと一致していないのは、これらの関数名がLabVIEWで使用されている関数名になる為です。Frame API for Cをご使用いただいておりますので、大変お手数ですがマニュアルのIndex(I-Nの項目)をご参照いただき、どのC関数がどのLabVIEW関数と同様の働きをしているかご確認いただく必要がございます。例えば、CのncCloseObjectは、LabVIEWのncCloseに相当します。また、CのncOpenObjectは、LabVIEWのncOpenに相当します。
    1)ncConfig関数での設定なのですが、以下ディレクトリのサンプルプログラムをご参照いただければ設定をご理解いただけると考えております。
    C:\Program Files\National Instruments\NI-CAN\MS Visual C\Frame API examples\CAN Receive
    2)ncCreateNotification関数は、上記リンク先、またマニュアル(11-39)にてサポートされている関数として記載されておりません。
    3)上記リンク先にありますように、ncWaitForState関数は、Read MultipleとWrite Multipleをサポートしていないと認識しております。
    上記内容をご確認頂き、ご不明な点がございましたらご返信くださいますようお願いいたします。
    よろしくお願い致します。

  • Using Frame API for C, Need to change Data size for a TX Object

    I need to Transmit different messages to the same ArbitrationID address. The Transmited messages have variable lengths. Can I call ncConfig on an object to change the NC_ATTR_CAN_DATA_LENGTH even after the call to ncOpenObject. Or do I have to Close the object and reopen it after the call to ncConfig?
    Thanks!

    Hello Genesis,
    your second assumption is right. You do have to close, reconfigure and reopen the object in order to change the data length.
    As long as you're using the CAN Object in the 'Transmit Data by Call' mode only, you might want to consider using the Network Interface for transmitting. When you use the Network Interface, you can change the ArbitrationID for each write call.
    -B2k

  • Why do I get an error of B2010002, when I open an NI-CAN object?

    I am using the configuration of the property page to setup the PCI-CAN card. I am using Extended Arbitration Number of 0xFEF100. My code is in VB 5.0. The code works with a number less than 0xFFFFF. The B201002 is an Implentation-specific error in NI-CAN driver. As soon as I try to open the CAN object this error is generated.

    Hello-
    A Status code of hex ....0002 tells us that it's a driver error (NC_ERR_DRIVER).
    Here's some solutions:
    -Be sure the card passes NI-CAN Diagnostics
    -Map Port1 to CAN0 and Port2 (if exists) to CAN1. This is done in the NI-CAN configuration utility in Win NT/2000 or through Device Manager in Win 9X/ME.
    -We have a limit of 50 CAN objects and 150 frames in the queues of these objects. It may be necessary to readjust these settings.
    Kim L.
    Applications Engineer
    National Instruments

  • CAN Object Transmits Waveform on RTSI

    I have a question to the above mentioned VI. The ncWriteObj.vi is placed in a For loop here. Does this mean that the For loop is executed once every time an RTSI event occurs???

    Hi SVJ,
    the For loop in the mentioned example is executed 8 times before the CAN object is started. Since there is a 8 element queue configured in the ncConfigCANObjRTSI.vi these 8 CAN frames are transmitted after starting the communication using ncAction. After 8 RTSI pulses when the queue is empty the object repeats the last frame until new frames are written into the queue using ncWriteObj (within the while loop).
    If you encounter queue overflow problems please refer to the following knowledgebase:
    http://digital.ni.com/public.nsf/allkb/862567530005F0A186256A3F005FAB83?OpenDocument
    or the "NI CAN Hard- and Software manual" p. 10-150 ncWriteObj.
    Message Edited by AndreasS on 11-10-2008 08:57 AM
    Andreas S
    Systems Engineer

Maybe you are looking for

  • How do I access my CC files using Lightroom 5 so that I can edit photos from desktop or laptop

    Very frustrated. I am not sure if this is a question about 'syncing' (since it's apparently not available to everyone - though this wasn't mentioned when they sold me on their subscription), about 'work flow' (what ever that means), 'catalogs', 'libr

  • How can I create a savable form?

    A form pdf I created in Pro, then opened in Reader cannot be saved with the filled out info. I created it with no security, and with the extended property on. Both Pro and Readers are the latest versions. What am I missing?

  • Mbp 2.53ghz intel core 2 duo over heat

    my mbp is over 70c I installed SMcFanControl and the fan is ruynning about 3,500rpm which the normal temp on MBP 2.53ghz intel core 2 duo??? the status on Istat about the fan say: Fan Exhaust? Help please greetings

  • UDO doesn't show child table contents

    Hi everyone:    I have a big trouble: I have a UDO form with a master table and 1 child table. When I save data in this form, everything is OK, but when I browse in the records, I just got data from master table.    I should show child table data in

  • Configuration backups of UCS config

    Anyone know how to do automated, regular backups of the full UCS config? So far, all I can find in the docs is how to setup regular scheduled backups of the system event log.