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

Similar Messages

  • 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 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

  • Making a simple gallery - issues with frames

    Hi there,
    Please help!
    I'm at the end of my tether with this one.
    I am a beginner with Dreamweaver and maybe I'm running before I can walk, but I thought what I am trying to make would be fairly simple.  Haha!
    I want to make a basic gallery, ie. you click the arrows or the thumbnail buttons and the next image appears within the page but DOESN'T reload to a whole separate page.
    I managed to do this using a frameset and thumbnails - the images loaded in the main frame fine -  BUT there are 2 issues with this:
    1. The link to the homepage I added in the corner loads WITHIN the frameset, and so the homepage is cut off and the thumbnails are still there.  I want the link to take the user OUT of the frameset and straight to the homepage (a totally different format, with no frames used)  I can't find a way to put this homepage link anywhere outside of the frameset.
    2.  I cant centre the frameset, or have much control over the layout like I do with tables.
    Could this problem be solved using tables? Or any way to solve this simply?
    Thanks.
    PS. I don't have fireworks, and I don't want to use a downloadable gallery as I want control over how it works/looks, also I dont think it would solve issues 1 and 2 anyway.

    kcoulton30 wrote:
    Thanks.
    PS. I don't have fireworks, and I don't want to use a downloadable gallery as I want control over how it works/looks, also I dont think it would solve issues 1 and 2 anyway.
    I don't understand this comment at all.  If you use a downloadable gallery you just edit the skin as you would any other HTML document and make it look like the rest of your site.  And usually support communities for those products are fairly helpful for skinning.  Learning to code something like this with frames for a first project is a little ambitious but it is heading in a direction that I know you are not looking to go.  I have a feeling you like the interactive galleries that pop up and switch from image to image while staying on the same page.
    To answer your questions:
    1.  You need to define the target frame with frames. By default links open within the window they are currently in.  See this example: http://webdesign.about.com/od/frames/f/bl_faq4-2.htm
    2.  Framesets cannot be centered on a page.  They are part of the overall page layout and cannot be positioned.  If you need to position a frame on a particular part of a page you will need to use iframes: http://www.w3schools.com/tags/tag_iframe.asp

  • Can you replace damaged frames with Adobe Premiere Pro CS6 ?

    Hello everyone! I'm new to Premiere Pro CS6 and don't know all the tricks (no previous experience with video editing). I have a video file that has some damaged frames (it is a VHS-DVD bad quality transferred file). I'm wondering is there is a way to replace the damaged frames with adjacent good ones so the audio is not disrupted (instead of just deleting the damaged frames). Please advise and be gentle . I'm a beginner! Thanks!
    Damaged image                                                                                Good image next to damaged one

    Thanks. I think I got it. I have two more questions. I'm trying to preview the video but it doesn't play in real time. The audio plays Ok but the video is lagging. I'm attaching my computer info so you can tell me if it is my computer's limitation.
    Second question is regarding filters. In some parts of the video there's some horizontal lines scrolling down the screen. I wonder is there's a filter to minimize this issue before exporting. In the Export Setting I see only Gaussian Blur. I wanted to post a video sample but I don't see an option to post a video file that is not a link with a URL.
    Message was edited by: Ellis home
    I switched to a Dell Inspiron 570 computer with better Processor: AMD Athlon II X2 250 Processor 3.00 GHz and the video now plays in real time.

  • Make freeze frame with filters effects showing?

    I'm using the dvMatte Pro plug-ins to strip out the green screen and replace it with a different background.
    Even if I render the entire project, if I take a freeze frame (while the canvas and viewer show the subject against the newly added background), the freeze frame shows the green screen.
    How can I remedy this?

    Copy the clip from which you created the still frame. Right-click on the still frame in the Timeline and select Paste Attributes->Filters.
    Or, open the clip in the Viewer and drag the filters onto the still frame.
    -DH

  • How Can i use Html frames with  simple JSP???

    How Can i use Html frames with simple JSP???
    Actually i am creating an application in which i have used Index.html as frame.
    Noew i am trying that if i click on a link of one frame(say menu frame) the \result shoul come to some other frame(say frame named mainwindow).
    Hoe can i do like this???
    Anand Pritam

    Well i am using..
    < Base target="mainwindow">
    But it is no working is there some other way??

  • IPhone/Safari can't navigate Internet Sites with Frames.

    Here's a riddle for all you mega-geeks out there...my iPhone 3G can't function on an Internet site I use that has Frame type navigation (navigation links are in a separate window on the left, the main window always shows the homepage address in the browser no matter what page you go to). When I go to this site,(it's a local estate-sales site) and try to navigate beyond the home page, the icons/links in the navigation frame are displayed as little boxes with "?" marks on them, there is no way to get in to any page past the home page. Is there a way to configure Safari to be able to deal with frames?

    Hi, Thanks for the input...it may be the way the site in question is coded that makes the navigation frame unusable. I tried using a different site that uses frames, and that site works fine. In case anyone wants to see what I'm talking about, the site my iPhone cannot get into beyond the home page is estatesale-finder.com (a handy site if you happen to live in the Portland area and like estate sales). This site comes up and works fine on all my PC machines...it is only the iPhone that cannot naviagte on the site. Thanks...

  • Can anyone split frame into three independent areas with JSplitPane??

    Hi,
    has anyone tried to use JSplitPane to split JFrame in to 3 different areas? How should it be done correctly?
    What I have now is two nested JSplitpanes, i.e. I have 'baseSplitPane', which divides frame in two sections, and then I have 'upperSplitPane' as a top component of the baseSplitPane. Then I have three JPanels with JTables inside them; I need to show three JTables (lets call the upper, middle and lower;=) in one JFrame, and I should be able to resize them some some clever way.
    The problem is:
    When I move splitter of the baseSplitPane towards the top of the screen, first the middle table is shrinken. After that upper table starts to shrink, until splitter is in the top of the screen. When I start to move the splitter back to the bottom, the upper table still remains "minimized", and only the middle table is enlarged. No good!
    What I would need is a splitpane for three components, which splitters don�t affect each other. So that when moving a splitter, it just changes the size ratio of the two componts around it, and if you move it to the other splitter it stops. There�s no such component in SWING, is there??
    All hints are appreciated, thank you!
    /Jari

    That�s not exactly what I needed, but anyway that is much better than it used to be! So thank you for it, but still; moving one splitter effects to another splitter also.
    If no one tells me a better way to handle this, maybe I can live with it...
    Any other good hints, GraemeHook?
    /Jari

  • I'm trying to order album and I'm getting this message:Your book seems to have frames on one or more pages that do not contain photos. You must either change the layout of those pages or place photos in those frames before you can proceed with this book.

    I'm trying to order an album and I'm getting this message:
    Your book seems to have frames on one or more pages that do not contain photos. You must either change the layout of those pages or place photos in those frames before you can proceed with this book.
    As far as I can see I have placed pictures on all the pages. I admit that on some pages I could have placed 3 or 4 pictures but I chose to use ony one or two. Could that be the problem?

    Yes -
    Your book seems to have frames on one or more pages that do not contain photos. You must either change the layout of those pages or place photos in those frames before you can proceed with this book.
    The error seems pretty clear - you must have a photo in evey photo frame in order to place your order - so you must either change the layout (if you only want one photo on a page then use a layout with one photo) or put photos in the spots you have not filled
    LN

  • How can i work with frames in html

    i am working with frames and jsf
    left side is one.jsf
    right side is login.jsf
    frame
    one.jsf | login.jsf
    ............ |.................
    .............|...............
    ............ |...................
    after login is successful . i am in success.jsf in right frame
    1.e
    frame
    one.jsf | success.jsf
    ................... |........................
    .................... |.......................
    ----------------|-----------------
    then if i am refreshing the content by refresh button.
    again i am getting login.jsf on right side which i don't want.
    1.e
    FRAME
    one.jsf | login.jsf
    ............. |..................
    .............. |..................
    ------------|-------------
    but what i want is even after refresh i have to get success.jsf after login like this what to do
    FRAME
    one.jsf | success.jsf
    ............... |.....................
    ................ |.......................
    -------------|------------------
    with regards

    You need to convert the string date to datetime or date. See conversion examples here:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Example for the where clause:
    WHERE DATEDIFF(DD, convert(datetime, lastdate, 101), getdate() ) < 1
    Can you post sample string dates?
    Are you looking for today's records? Another option (depends on lastdate format):
    WHERE lastdate = convert(char(8), getdate(), 112)
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Why can't I advance a video frame-by-frame with the arrow keys?

    I am able to play a video, and to scrub through by clicking and dragging the play head, but when the video is paused, my arrow keys won't advance frame-by-frame.  Is there a place that I have to enable the arrow key function?  I've looked through the Preferences but didn't see anything.  Anybody know how to get this to work?  Thanks!!

    This forum serves Photoshop.com, the online service.
    For help with the desktop version of Photoshop CS, please repost your question here: http://forums.adobe.com/community/photoshop

  • Can I go Frame-by-Frame with video AND audio?

    I'm new to soundtrack pro. In Final Cut, I liked being able to use the arrow keys to see the video frame by frame and also hearing the audio frame by frame. I can not seem to figure out how to do this in soundtrack. Is it possible?

    You may need a 3rd party application to view the DVD in a wWindows format such as
    http://flip4mac-3.en.softonic.com/mac
    https://www.macupdate.com/app/iphone/5758/vlc-media-player

  • Can you freeze frame with the imovie app. and save the freeze frame to a picture

    Can I freeze frame on the iMovie app and turn the freeze frame into a picture?

    Experiencing the same issue. Fired up iMovie for the first time today and created 2 movies. The first was 35 seconds long and the 2nd was 1 min 45 seconds long. Got all my pics loaded up and added a song from my personal collection. Plays perfectly from the phone. The problem occured when I tried to export the larger movie. The first time I tried, it sat at the exporting movie status bar (without moving) and then closed the app. After relaunching the app, it told me that my audio file had been removed from the phone. After closing and re-opening the iMovie app again, my movie project played fine through the app but as soon as I tried to export again it rebooted my phone. I tried exporting on all 3 size options (Medium, Large, HD) and it did not matter. I tried multiple songs thinking perhaps that was my issue, but each one did the same thing. I tried the lock-screen time-out fix but that didn't help either. I have no problems exporting my smaller movie file (35 seconds)using any of the export sizes. This leads me to believe that the issue is soley related to the length of the project...or perhaps the number objects located in the project. In either case, it's definitely an app issue. I do love the app though...when it works.

  • Creating a Frame with two JTextareas

    Please Help,
    I am currently studying java at the moment i am new to programming and find it difficult. However i have a problem using Swing. I am trying to create a "JTextarea" in the NORTH of the Frame and another "JTextarea" in the CENTER. I have write both bits of code to do this. When i added the second JTextarea i lost the first JTextArea when i ran the program. I figure the program is reading the first part of code then overwriting it with the second part of the code. Can anyone help?
    The code i wrote was as follows;
    //Java extension Package
    import javax.swing.*;
    //Java core Pakages
    import java.awt.*;
    import java.awt.event.*;
    public class Panel extends JFrame
    public JTextArea textArea1, textArea2;
    public static void main(String[] args) {
    JFrame frame = new JFrame();
    frame.setTitle("Swing Example");
    //Displays NORTH JTextArea
    JTextArea textArea1 = new JTextArea("Click something to see what happens...");
    frame.getContentPane().setLayout(new BorderLayout());
    frame.getContentPane().add(textArea1,BorderLayout.NORTH);
    //Displays text in CENTER
    JTextArea textArea2 = new JTextArea("This is a JTextArea\n" +
    "component. It is placed in\n" +
    "the Center position after the\n" +
    "JTextArea is placed North,\n" +
    "the three JButtons are\n" +
    "placed in a West JPanel\n" +
    "and the JComboBox\n" +
    "components is placed in an\n" +
    "East JPanel.");
    frame.getContentPane() .setLayout(new BorderLayout());
    frame.getContentPane() .add(textArea2,BorderLayout.CENTER);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setVisible(true);
    }

    Hello,
    Thankyou for helping me with that problem it is much appreciated no doubt ill have some more questions.
    L. Tambiah

Maybe you are looking for