LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vxlapi

Solved!
Go to solution

Hello MR. TroyK

I really appreciate your work and your support and thanks for the solution now my VI works exactly fine.

really thanks for your support.

but there is another issue which I am facing is related to your CAN e.g I will attach the VI just please check that VI as I am facing difficulty in the bus monitor.

 

Download All
0 Kudos
Message 11 of 18
(1,376 Views)

The VI attached is my CAN receive example, unmodified, from my vxlapi wrapper library here. You don't have to attach it if it's already on ni.com somewhere, just refer to it with a link if you like.

 

How is it not working? What is your CAN bus setup?

From your front panel picture I see what appears to be a CAN frame with all 00s for ID and content.  This is probably an error frame.  I did not include code in the example to differentiate between normal received CAN frames and error frames.

First things to check are:

  • that there is another node on the bus to ACK the sent frames
  • that both nodes are set to use the same bit rate
  • that the physical bus has appropriate termination
Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 12 of 18
(1,372 Views)

there is an modification done on that VI is that I have used your CAN transmit VI with the CAN receive VI because my objective is to obtain Tx & Rx frames from one single CAN.

Please check my VI one more time so that you can tell  e what thing I am missing in that VI and how to solve that error.

 

0 Kudos
Message 13 of 18
(1,367 Views)

 


@Kdbrose wrote:

my objective is to obtain Tx & Rx frames from one single CAN.


You need to two nodes on the bus. One to transmit, one to ACK.

If you want to see your own transmit messages, you need to xlCanSetChannelMode to generate tx receipts.

 

  • Is there another node on the bus to ACK the sent frames?
  • Are all nodes set to use the same bit rate?
  • Does the physical bus have appropriate termination?
  • Do you understand how CAN works?
  • Have you read the vxlapi documentation to understand how the API works?
Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 14 of 18
(1,363 Views)

for your ques:-

1. Yes I have the real ECU

2. yes the termination is properly

3. Yes I know

4. which part I need to learn to understand this API concept for CAN

0 Kudos
Message 15 of 18
(1,359 Views)

I recommend starting with section 2.4.1 - CAN Application flowchart in the XL Driver Library description document.

It shows you which functions you can use in which order. Then look at the specific functions, they have a description of what they do.

 

When you ask questions here, be specific about what you're expecting from your code and what you're getting.

Also explain what you have done to try and resolve the issue yourself. Then I won't have to repeat things that you already know.

 

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 16 of 18
(1,357 Views)

As per the document the XL_CAN Transmit should contain message count but our dll doesn't contains that message count can you please explain why it is like this.

0 Kudos
Message 17 of 18
(1,354 Views)

The message count in was connected, but the output was missed.

Feel free to connect it yourself.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 18 of 18
(1,348 Views)