Jump to content

Error 1074388947 at CAN Open Object, Exceed resource limit


lraynal

Recommended Posts

This message has been cross-posted on the NI forum: http://forums.ni.com/ni/board/message?boar...;thread.id=2982

Dear All,Basically, I'm listening to 5 frames from NI-CAN, and I can't listen to the sixth... To be more precise, I'm listening to STAT1, STAT2, EXT1, EXT2 and I'm sending commands to CMD.When I try to add a "hearing" on the BITE frame, I obtain the error:"1074388947 occured at NI-CAN Open Object (ncOpen.vi)NI-CAN: Exceeded resource limit for queues in shared memory between firmware/driver. The ncReadmult function is not allowed. Solutions: Decrease queue lengths in objects; Set read queue length to at least 2; Decrease number of CAN Objects." I can't see any significative parameter to change...I'm doing a ncConfigCANNET + ncOpen + ncSetAttr, then for each frames: ncConfigCANObj + ncOpen + ncSetAttr + ncCreateOccur. That's when I'm adding the sixth frame's part, I get the error at the output of the ncOpen.Does someone knows what's happening ?Thanks for any help you could give me, even if it's just a thought... Thanks in advance ! I'm quite desperate actually...Laurent

Link to comment

This message has been cross-posted on the NI forum: http://forums.ni.com/ni/board/message?boar...;thread.id=2982

Dear All,Basically, I'm listening to 5 frames from NI-CAN, and I can't listen to the sixth... To be more precise, I'm listening to STAT1, STAT2, EXT1, EXT2 and I'm sending commands to CMD.When I try to add a "hearing" on the BITE frame, I obtain the error:"1074388947 occured at NI-CAN Open Object (ncOpen.vi)NI-CAN: Exceeded resource limit for queues in shared memory between firmware/driver. The ncReadmult function is not allowed. Solutions: Decrease queue lengths in objects; Set read queue length to at least 2; Decrease number of CAN Objects." I can't see any significative parameter to change...I'm doing a ncConfigCANNET + ncOpen + ncSetAttr, then for each frames: ncConfigCANObj + ncOpen + ncSetAttr + ncCreateOccur. That's when I'm adding the sixth frame's part, I get the error at the output of the ncOpen.Does someone knows what's happening ?Thanks for any help you could give me, even if it's just a thought... Thanks in advance ! I'm quite desperate actually...Laurent

Link to comment

QUOTE(lraynal @ Nov 26 2007, 06:21 AM)

G'Day Laurent!

Can you post the code that you're using (or a cut-down example) that demonstrates the issue? I'm not sure, but I think you might be trying to read something outside of the data portion of the message frame:

post-181-1196025455.gif?width=400

Have a look at this wikipedia page - which part of the message frame are you trying to read? Is it within the data frame? The reason I ask is that you mention two base frames and two extended frames, and that suggests that the extra frame you're looking for isn't one of those - or am I getting the question wrong?

PS: you post has motivated me to write an article on industrial automobile networks for my blog? - coming soon! :)

Link to comment

QUOTE(lraynal @ Nov 26 2007, 06:21 AM)

G'Day Laurent!

Can you post the code that you're using (or a cut-down example) that demonstrates the issue? I'm not sure, but I think you might be trying to read something outside of the data portion of the message frame:

post-181-1196025455.gif?width=400

Have a look at this wikipedia page - which part of the message frame are you trying to read? Is it within the data frame? The reason I ask is that you mention two base frames and two extended frames, and that suggests that the extra frame you're looking for isn't one of those - or am I getting the question wrong?

PS: your post has motivated me to write an article on industrial automobile networks for my blog.

Link to comment

Hi !

Download File:post-6600-1196084490.zip

Here is the code, but as you can see it's quite big (2Mo zipped) because I don't have time to compress or even clean it...

It's a code I "just" have to debugg, and that's not really pretty and easy to do !

Anyway, I don't think it's a problem like the one you are talking about.

The soft open the CAN Network, then create one object per frame (so 5 objects: CMD, STAT1, STAT2, EXT1, EXT2) and read these 5 frames in 5 different threads.

I know that's probably not the best solution, but I didn't write this code, you know what it is to inherit from others...

If anyone has any suggestion to update/ameliorate it, don't hesitate ! It could resolve my troubles, who knows...

QUOTE(crelf @ Nov 25 2007, 10:18 PM)

I'm glad to ear that ! Anything to help you !!!!

Cheers,

Laurent

Link to comment

Hi !

Download File:post-6600-1196084490.zip

Here is the code, but as you can see it's quite big (2Mo zipped) because I don't have time to compress or even clean it...

It's a code I "just" have to debugg, and that's not really pretty and easy to do !

Anyway, I don't think it's a problem like the one you are talking about.

The soft open the CAN Network, then create one object per frame (so 5 objects: CMD, STAT1, STAT2, EXT1, EXT2) and read these 5 frames in 5 different threads.

I know that's probably not the best solution, but I didn't write this code, you know what it is to inherit from others...

If anyone has any suggestion to update/ameliorate it, don't hesitate ! It could resolve my troubles, who knows...

QUOTE(crelf @ Nov 25 2007, 10:18 PM)

I'm glad to ear that ! Anything to help you !!!!

Cheers,

Laurent

Link to comment

QUOTE(crelf @ Nov 26 2007, 04:10 PM)

You're absolutely right - now that I see your code, your problem isn't what I was talking about - sorry for the confusion. What is the value of "ObjHandle In" at "ncAction.vi"? Are you sure that it's valid? Are you sure that the BITE element of "Identificateurs" that you seem to manually build in "Configurer CAN1.vi" is right?

Yes, it is correct. If I disable one of the frames (for ex: STAT2) and enable the BITE frame, I can get it correctly. So the "address" of this BITE frame is correct.

NI-CAN seems to unlike the fact to "read" more than 4 objects (+ 1 command).

I suppose that's a problem of configuration, but can't see which one to change to get what I need. I tried a lot of different configuration, but the hardware I'm working on, doesn't like to love some of them.

Argh !!!!! Looks like I'm gonna spend a ong time on this problem, and I need this stuff for yesterday... Argh !!!!!

Well, thanks for your help, and everyone else who is watching this thread !

Please continue to give me some advices... (should be something easy I can't see cos' I'm to much inside this trouble for long days...)

Cheers !

Laurent

Link to comment

QUOTE(crelf @ Nov 26 2007, 04:10 PM)

You're absolutely right - now that I see your code, your problem isn't what I was talking about - sorry for the confusion. What is the value of "ObjHandle In" at "ncAction.vi"? Are you sure that it's valid? Are you sure that the BITE element of "Identificateurs" that you seem to manually build in "Configurer CAN1.vi" is right?

Yes, it is correct. If I disable one of the frames (for ex: STAT2) and enable the BITE frame, I can get it correctly. So the "address" of this BITE frame is correct.

NI-CAN seems to unlike the fact to "read" more than 4 objects (+ 1 command).

I suppose that's a problem of configuration, but can't see which one to change to get what I need. I tried a lot of different configuration, but the hardware I'm working on, doesn't like to love some of them.

Argh !!!!! Looks like I'm gonna spend a ong time on this problem, and I need this stuff for yesterday... Argh !!!!!

Well, thanks for your help, and everyone else who is watching this thread !

Please continue to give me some advices... (should be something easy I can't see cos' I'm to much inside this trouble for long days...)

Cheers !

Laurent

Link to comment

QUOTE(lraynal @ Nov 27 2007, 01:37 AM)

If I disable one of the frames (for ex: STAT2) and enable the BITE frame, I can get it correctly. So the "address" of this BITE frame is correct. NI-CAN seems to unlike the fact to "read" more than 4 objects (+ 1 command).

Yep - sounds like you're screwed :)

Link to comment

QUOTE(lraynal @ Nov 27 2007, 01:37 AM)

If I disable one of the frames (for ex: STAT2) and enable the BITE frame, I can get it correctly. So the "address" of this BITE frame is correct. NI-CAN seems to unlike the fact to "read" more than 4 objects (+ 1 command).

Yep - sounds like you're screwed :)

Link to comment

OK, I have the solution !!!! Thanks to Johann (on the NI Forum)

The problem comes from the parameters to control the queue size regarding the memory size. Of course you will tell me ! But that was pretty difficult to find all the informations to manage the best way these queues...

Here is the formula:

Memory_used = (( Queue_length +1) x Entry_size ) + 30

with:

Queue_length: the parameter to enter in ncConfigCANObj.vi

Entry_size: 8 bytes for a command frame and 16 for a reading frame.

30: the size of a header

And the memory available is usually 6600 bytes.

In my case I need to configure the 5 queue size at 30 (frames) to be sure that it fits my memory !

Well, I hope this is clear !

Thanks for those who tryed to help me !!!!

Cheers,

Laurent

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.