lraynal Posted November 26, 2007 Author Report Share Posted November 26, 2007 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 Quote Link to comment
lraynal Posted November 26, 2007 Report Share Posted November 26, 2007 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 Quote Link to comment
crelf Posted November 26, 2007 Report Share Posted November 26, 2007 QUOTE(lraynal @ Nov 26 2007, 06:21 AM) When I try to add a "hearing" on the BITE frame, I obtain the error... 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: 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! Quote Link to comment
crelf Posted November 26, 2007 Report Share Posted November 26, 2007 QUOTE(lraynal @ Nov 26 2007, 06:21 AM) When I try to add a "hearing" on the BITE frame, I obtain the error... 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: 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. Quote Link to comment
lraynal Posted November 27, 2007 Author Report Share Posted November 27, 2007 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) PS: your post has motivated me to write an article on industrial automobile networks for my blog. I'm glad to ear that ! Anything to help you !!!! Cheers, Laurent Quote Link to comment
lraynal Posted November 27, 2007 Author Report Share Posted November 27, 2007 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) PS: your post has motivated me to write an article on industrial automobile networks for my blog. I'm glad to ear that ! Anything to help you !!!! Cheers, Laurent Quote Link to comment
crelf Posted November 27, 2007 Report Share Posted November 27, 2007 QUOTE(lraynal @ Nov 26 2007, 11:42 PM) Here is the code, but as you can see it's quite big (2Mo zipped) It's big, and there's even stuff missing from it QUOTE(lraynal @ Nov 26 2007, 11:42 PM) It's a code I "just" have to debugg, and that's not really pretty and easy to do ! We've all been in that horrible situation QUOTE(lraynal @ Nov 26 2007, 11:42 PM) Anyway, I don't think it's a problem like the one you are talking about. 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? QUOTE(lraynal @ Nov 26 2007, 11:42 PM) I'm glad to ear that ! Anything to help you !!!! Quote Link to comment
crelf Posted November 27, 2007 Report Share Posted November 27, 2007 QUOTE(lraynal @ Nov 26 2007, 11:42 PM) Here is the code, but as you can see it's quite big (2Mo zipped) It's big, and there's even stuff missing from it QUOTE(lraynal @ Nov 26 2007, 11:42 PM) It's a code I "just" have to debugg, and that's not really pretty and easy to do ! We've all been in that horrible situation QUOTE(lraynal @ Nov 26 2007, 11:42 PM) Anyway, I don't think it's a problem like the one you are talking about. 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? QUOTE(lraynal @ Nov 26 2007, 11:42 PM) I'm glad to ear that ! Anything to help you !!!! Quote Link to comment
lraynal Posted November 27, 2007 Author Report Share Posted November 27, 2007 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 Quote Link to comment
lraynal Posted November 27, 2007 Author Report Share Posted November 27, 2007 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 Quote Link to comment
crelf Posted November 27, 2007 Report Share Posted November 27, 2007 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 Quote Link to comment
crelf Posted November 27, 2007 Report Share Posted November 27, 2007 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 Quote Link to comment
lraynal Posted November 29, 2007 Author Report Share Posted November 29, 2007 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 Quote Link to comment
crelf Posted November 29, 2007 Report Share Posted November 29, 2007 QUOTE(lraynal @ Nov 28 2007, 07:42 PM) Here is the formula: What a pain in the arse! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.