Max number of Messages using Channel API?

We have a 2-port CAN card (series 2) runing at 500kB. When we use channel API to setup 9 messages (about 20 signal-channels) at 100Hz update rate in a write task - the data is constant, set to repeat output last sample (therefore butffer size is not the problem).
Task Init-start gives error of too many channels too high speed. when we set only 8 messages at 100Hz or 9 messages at 90Hz, it works fine.
If we calculate based on 500kB and 8-byte messages (give enough overhead), CAN bus shall be able to transact at least 40 full-length (8-byte) messages at 100Hz.
there are two Rx messages at 50Hz on the bus. (totally only these 10 or 11 messages are on the bus).
so what is the problem, simple because the CAN channel API is not good enough? 

The NI-CAN driver I used was 2.3.1f1(?), then updated to 2.4.0f0. the results are the same. the erroe code is: -1074388831.
Dirk is right. I did some tests and find the max speed it can spit to the bus is 666Hz (frames/s). this is true for both channel API - sampled ouput and for frame API - CAN objects.
this will not meet the requirement of my (and many) application. I want use the NI CAN card to simulate several controllers in a vihicle to talk to one controller to be test. there are usally more than ten messages, many of them at 10ms update rate.
when using frame API network object, timestamped, the max throughput seen is 830Hz.  when use "immedaite", the max throughput is ~3.15kHz (76% bus load). this rate probably meets most application,
what's Interesting is, when use channel API, signle write (sample rate 0) in a loop, use the loop to control the rate, it is able to reach same ~3.2kHz rate, although the timing is not very accuate (but the channle API is not well timed either at higher rate: 6 messages sample rate at 100Hz, ouput recent: varying from 96 to 104Hz).
the driver needs some improvement.

Similar Messages

  • How can i send a set of can messages through channel api

    Can anyone post an example code for sending a set(more than 3) of CAN signals using channel api.

    you checked for examples? 
    Please remember to accept any solutions and give kudos, Thanks
    LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7

  • CAN error while using Channel API

    Hi
    Please find attached error message and code. I am sending message "BS_200" to the CAN channel 0. I get reference of the message from the dbc file called A.dbc. Please let me know  why does it show such an error message.
    Thanks and Regards
    Anoop
    Attachments:
    CAN error.JPG ‏20 KB
    test_2_Chnl api.vi ‏24 KB

    Hello,
    The maximum number of tasks you can have is 128, and the maximum number of messages is 272-number of tasks.  It's weird that you are getting that error though, since you are only using one message in your VI.  If you create a message in Measurement and Automation Explorer (MAX) and try to use that in your program, do you still get the error? If you import the dbc file into MAX (Right-click on CAN Channels, and select "Import Import from CANdb file") and use the message from MAX in your program instead of from the the file, do you still get the errror? Do you get the error if you try to use a different message, or does it only occur with the "BS_200" message?
    Please let me know what the results are, and I'll see if I can figure out what's going on here. Also, if it's possible for you to send me the dbc file you have (if it's not top secret),  I could try to reproduce the error. Hope this helps! Thanks!
    Regards,
    Ebele O.
    National Instruments

  • CAN program using Channel API receives only 0

    Hello everyone,
    I'm get in stuck. I'm currently programming CAN interface for a transmission using PXI, Channel API and a .dbc file.
    CAN configuration based on .dbc file is downloaded to PXI by MAX. 
    The problem is that it receives 0 for all the values by Channel API based program (Attached file), though it seems receiving meaningful data when I check raw data by Frame API based program. 
    Baudrate, CAN port, and .dbc file are correct.
    thanks! 
    Attachments:
    All signals and values.vi ‏22 KB

    Hi Yuta
    What I am expecting is that the sample rate is being set to high. When using the multiple channel - single sample instance of the CAN read vi, it will return a single sample for every period. The number of samples to read input is actually ignored and it will return a single sample for every channel specified. Therefore, if no data has been received within the sample period specified with the sample rate, it will return the default value as specified in the database file.
    Due to the high sample rate, it might be that data is being received, but aren't visible on screen since they are quickly being overwritten by new (default) data. I suggest trying to use the Multiple Channels - Multiple Samples instance of the CAN Read vi to see if you receive values in this case. Or you could try lowering the sample speed (note that sample rate is not the same as CAN baud rate).
    Also, make sure you are properly reading the data already in MAX's test panel as this would indicate if the database file is loaded properly.
    Best Regards
    Michiel
    Applications Engineer
    NI Belgium
    http://www.ni.com/ask

  • CAN program using Channel API doesn't receive data

    Hello everyone,
    I'm get in stuck. I'm currently programming CAN interface for a transmission using PXI, Channel API and a .dbc file.
    CAN configuration based on .dbc file is downloaded to PXI by MAX. 
    The problem is that it receives 0 for all the values by Channel API based program (Attached file), though it seems receiving meaningful data when I check raw data by Frame API based program. 
    Baudrate, CAN port, and .dbc file are correct.
    thanks! 
    Attachments:
    All signals and values.vi ‏22 KB

    Hi Yuta
    What I am expecting is that the sample rate is being set to high. When using the multiple channel - single sample instance of the CAN read vi, it will return a single sample for every period. The number of samples to read input is actually ignored and it will return a single sample for every channel specified. Therefore, if no data has been received within the sample period specified with the sample rate, it will return the default value as specified in the database file.
    Due to the high sample rate, it might be that data is being received, but aren't visible on screen since they are quickly being overwritten by new (default) data. I suggest trying to use the Multiple Channels - Multiple Samples instance of the CAN Read vi to see if you receive values in this case. Or you could try lowering the sample speed (note that sample rate is not the same as CAN baud rate).
    Also, make sure you are properly reading the data already in MAX's test panel as this would indicate if the database file is loaded properly.
    Best Regards
    Michiel
    Applications Engineer
    NI Belgium
    http://www.ni.com/ask

  • Max number of messages in PI queues

    All,
    I got a question from a customer wondering how many messages can pill up in XI queues until the system 'explods'. Anyone of you has an idea?
    Thanks a lot
    Dimitri

    Hi,
    there is no specific value for that. As already mention this depends on some facts like your system resources, message size, frequency, EO / EOIO, number of queues, ...
    From my experience: I've seen systems with some several tousands of messages (small one's up to 3 MB) and PI did not have any problems with it.
    Regards,
    Kai

  • CAN Periodics using Channel APIs

    Hi All,
    I need your suggestions on the application i have attached here with in the post.
    The sample Application attached is used to send periodic messages on the CAN interface, by acquiring the message from a dbc. I need to send periodic message for every one second. The application requires to do few initializations and then enable the periodics to be sent. After performing few tests it has to disable the periodic messages.
    I would like to know if the attached application does serve my purpose. Any suggestions would help me in learning and improve myself.
    Thanks and Regards,
    Pradeep
    Attachments:
    main_app.vi ‏26 KB
    Send_Periodics.vi ‏32 KB
    stop_periodics.vi ‏5 KB

    Hi Rima,
    Thank you for your suggestions, however I would like to clarify some of the points you have suggested.
    1. In the case structure, cases 2..5, would be having a different functionality implemented.
    2. The critical part of the application is the placement of the loops. I tried experimenting with the code in all possible combinations. If I combine the two loops into one the CAN periodic VI would be called only once before the enable periodic message is enabled. This would not allow the CAN periodic function to run.
    3. I have also noticed that if the enable periodic message set to true before the loop gets executed the application loops in the CAN periodic VI and the control does not go to the next state in the case structure.
    Due to above reasons I had to use two loops, so that he CAN periodics VI will be executed when the enable periodic message variable is enabled and using a global variable to stop sending of the CAN periodics.
    Regards,
    Pradeep

  • How to send picture message using J2ME sms APIs?

    Hi,
    I experiment with SMS APIs, i successfully send simple text message. now i want to send picture message, how to send picture message using J2ME APIs.
    please guide me.
    guna.

    I experienced in coding sending and receiving sms in J2ME. Besides, I also esperienced in coding reading a binary file in a applicaition jar. But I never done these both together. Hence Im not sure it works or not. Below is the example to open and read a binary file:
    InputStream oInputStream = getClass().getResourceAsStream( "/picture.png" );
    if(oInputStream == null) {
    //File does not exist;
    throw new Exception("File not found");
    //Read the binary file and copy it to a byte array
    byte[] abyPicture = new byte[oInputStream.available()];
    oInputStream.read(abyPicture );

  • Channel API

    We are using Channel API and we want to be able to see which message that is read. How to do this? We don´t want to use MAX.

    First of all, make sure what type of CAN hardware you are using. If you have 'Series 2' NI CAN hardware, you should leave the fields in the configuration cluster empty and use the Series 2 Filter attributes instead:
    ncConfigCanNet (StartOnOpen = False)
    ncOpen
    ncSetAttr (Series 2 Filter Mode)
    ncSetAttr (Series 2 Mask)
    ncSetAttr (Series 2 Comparator)
    ncAction (Start)
    ncClose
    Of course, the fields of the configuration cluster do work with the Series 2 NI CAN hardware, however they are processed in software on Series 2 NI CAN hardware, whereas the above mentioned attributes work in hardware directly on the CAN controller (more efficient).
    Another good start would be the 'Series2 Filter Mode' example VI:
    NI Example Finder » Hardware Input and Output » CAN » Frame API » General
    Check out this knowledge base article:
    http://digital.ni.com/public.nsf/websearch/E834440265FD497986256968005DF85F?OpenDocument
    Regards,
    -B2k

  • CAN error with Channel API

    Hello All,
    Right now i am facing a CAN error when run my script which was developed using channel APIs. I am not able to trace out the the reason of the error. Pls find attached code and Error description. I have uploaded the sample code here and I am writing several messages in the same VI as same like in the code. Pls guide me in this
    Thanks in advance
    Anoop
    Attachments:
    CAN Channel API error.JPG ‏22 KB
    Channel API test.vi ‏29 KB

    Hi Anoop,
    Is the code you posted the exact code you are using when you get the error?  The reason I ask is, usually this error is associated with using the Set Property VI after the interface has already been started, such as in a loop.
    Are you able to use any examples from the Example Finder successfully? (Help > Find Examples)  You can Browse to CAN examples by clicking Hardware Input and Output > CAN > Channel API.
    Hope this helps!
    Adam W
    Applications Engineering
    National Instruments

  • Reading the mode channel start and no. of bits using the CAN channel API

    Currently I am using the CAN channel API to get information from a CANdb file.  I'm using it to get max, min, scaling information, etc.  However, I can not use it to get the start bit and the number of bits in the channel mode when using mode-dependant channels.  Is there an easier method to retrieve this information using one of the CAN API's instead of manually parsing the file myself for the information?

    I think that there has been some misunderstanding with regard to the
    original question. I believe Dillon is trying to find the start bit and
    number of bits in the multiplexer. The terminology of multiplexer and
    mode gets a little confusing. For clarification, my understanding is
    that a mode is a specific value of a multiplexer. In the case of Dirk's
    example code, he was able to retrieve the number
    of bits of the CHANNEL, but not the number of bits of the MULTIPLEXER. 
    I believe that I have run into a similar problem to
    Dillon's. I want to read a NI CAN Database (*.ncd) or a Vector CAN
    Database (*.dbc) programmitically. I have attached a zip containing a
    VI and some *.ncd file to allow others to see my progress thus far.
    This is a heavily modified version of Dirk's previously posted program.
    As you can see, it is easy to get a list of messages using the "CAN Get
    Names" VI. Using that list of messages, it is also easy to get a list
    of channels by reusing the "CAN Get Names" VI. The list of channels
    does not include any information as to whether or not they belong to a
    multiplexer, but fortunately we can use the "CAN Get Property" VI to
    find out which channels are mode dependent and the value of the mode
    that the channel corresponds to (if it is mode dependent).
    Unfortunately, this does not give us any information as to the location
    or length of the multiplexer which contains the mode. Thus, I know
    whether I should be looking for a multiplexer and I know what value to
    watch for in the multiplexer, but I have no idea where or how to look
    for that value in the CAN message.
    Interestingly, by
    playing around with Dirk's database that he had attached, I was able to
    determine that the list of channels does not always give out the same
    information. Typically, you will simply receive an 1D array strings
    containing only the channel names, but the output is different in the
    event that you have a database that meets the following criteria:
        1. Two channels (in different modes) have the same name
        2. The database contains at least two multiplexers
    In
    this case the output will be a 1D array of strings in which the
    repeated channels (regardless of whether they are in the same
    multiplexer) will be output in the format "<message
    name>.<multiplexer NAME>.<mode value>.<channel
    name>". The channels that have unique names are simply output as the
    channel name. Now this is helpful in that by default the multiplexer
    name contains the start bit of the multiplexer, but this cannot be
    relied upon. The creator of the database could easily change the name
    of the multiplexer and the format is only adhered to when the
    previously mentioned criteria are met. Also it still does not tell us
    anything about the number of bits expected in the multiplexer (remember
    Dirk had found the number of bits expected for the CHANNEL).
    I have found another alternative output format when the following criteria are met:
        1. Two channels (in different modes) have the same name
        2. Only one multiplexer is contained within the file
    In
    this case the output will be a 1D array of strings in which the
    repeated channels will be output in the format "<message
    name>.<mode value>.<channel
    name>".  Again, this special format is only used for the repeated
    channels. Uniquely named channels are simply output as channel names. While this is not particularly useful, but I thought I should mention it.
    It
    is also probably worth noting that I found the previously mentioned
    alternative formats by directly reading reading a *.ncd file. It
    appears that by reading the channels directly from MAX we get at least
    one additional format (<message name.channel name> ).  Considering
    that this is actually even less information and since my application
    specifically requires that I directly read a CAN database without the
    assistance of MAX, I have not significantly explored this avenue.
    Let
    me finish by reiterating the question that I am asking: How do you
    programmitically determine the start bit and number of bits of the
    multiplexers in a CAN database (*.ncd or *.dbc). I have attached a zip
    file containg my current "testing" VI and some databases to illustrate
    the results that I have described above.
    Message Edited by William Griffin on 01-06-2009 04:58 PM
    William Griffin
    NI Certified LabVIEW Architect
    NI Certified Professional Instructor
    DISTek Integration, Inc. - NI Certified Alliance Partner
    http://ww2.distek.com
    Attachments:
    test_mode_dep_msg_rev_B.zip ‏18 KB

  • Max number of chars in process message MSEL?

    Hi, what is the max number of characteristics can be used in process message category's MSEL table? Right now, I am using more than 99 characteristics and I get a short dump DYNPRO_FIELD_CONVERSION. Is it really limited to 99 characteristics and if it is true, is there an OSS note to change it to allow more than 99?
    Thanks and points available

    Please make sure that you build a
    multithreaded program first (check with ldd).
    If anyone can tell me the maximum number of threads per process I would
    really appreicate it.
    Also the maximum number of open files per process. It depends on the architecture (x86/SPARC), OS version,
    64 or 32-bit, /etc/system, shell limitations (/usr/bin/ulimit) ...
    Search for "rlim_fd_max / rlim_fd_cur" on docs.sun.com too.
    HTH,
    -vladimir

  • 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

  • Using frame and channel API at the same time.

    One of our customers specified the channel-mode number except programming the serial. So I have to use the channel api and the frame api at the the time! Is it possible with a 2 port PXI card like PXI-8461/2 (Port1 for channel api and port 2 for frame api)?

    Yes, you can have one port for channel api and one port for frame api. But you cannot mix on one port.
    DirkW

  • Sending messages thru email and SMS without using XMS APIs

    Hi,
    I already have some working code that sends messages thru email and SMS. But currently it uses XMS APIs therefore I have a dependency on files like wdk.jar. I want to try and eliminate using the XMS APIs and only use soap to send these messages. I was wondering if there is some documentation available on how I can do this. Also if there a lot of code that needs to be written to do that.
    I primarily want a very simple application that sends only string messages and reduce my dependencies.
    I would really appreciate all the advice.
    Thanks,
    Sonali Nath

    Hi,
    You may refer to the following links to check if they help:
    Sending SCCM Status Messages from MDT Scripts.
    Send SCCM task sequence email report
    Regards,
    Sabrina

Maybe you are looking for