From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vxlapi

Solved!
Go to solution

Hey Mr. TroyK

I m trying to interface your code with CANcaseXL.

With My ECU for LIN but the problem I m facing is that when I send header 1B to my ECU it show me response but at the same time my CANcaseXL error LED Flashes..so could you please provide the solution for it or could you also help me with error decoding code for LIN.

0 Kudos
Message 1 of 18
(4,457 Views)

Have you defined the checksum type correctly?

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 2 of 18
(4,385 Views)

the error I am getting is invalid access mask.


 


 

0 Kudos
Message 3 of 18
(4,336 Views)

The error light on the hardware does not light when there is an access mask problem.

The error light blinks for LIN hardware when a LIN frame is received that the port has not been configured to handle.

Invalid access mask is an error returned by the API when you try to open port or execute a function but the access mask you have supplied doesn't exist or isn't a LIN channel.

 

Did you start with one of my examples?

Have you turned on execution highlighting and confirmed which vi the error originates in?

Is the access mask correctly defined? What is it's value at the point where the error occurs?

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 4 of 18
(4,327 Views)

As from the image you can see that my master request ID is 3B and my slave ID is 1B but in the bus monitor I am unable to receive slave response..

You can check the images which I have attached to it and thanks for helping me..

Download All
0 Kudos
Message 5 of 18
(4,319 Views)

"Yeah... Nice picture."

 

In order to diagnose what the problem is, can you please do the following:

  1. Probe the "accessMask" line just before where the error comes out.
  2. Also probe the "error out" cluster exactly where the error occurs and set the probe to pause when there is an error.
  3. Reply with the "accessMask" value.

 

I believe the access mask is not a valid value.  That is why it is causing the "invalid access mask" error.

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 6 of 18
(4,311 Views)

access mask value is 2

0 Kudos
Message 7 of 18
(4,309 Views)

An accessmask of 2 sounds like a valid one (if you have only ever plugged in one CANcase and there's a LINpiggy in channel 2). 

BUT... Error code 6255 occurs when the driver doesn't know what went wrong. Something has gone wrong before this point.

The error you described at the beginning, was it:

6112 XL_ERR_INVALID_ACCESS or

6204 XL_ERR_INVALID_CHANNEL_MASK

 

In my experience, sometimes when the driver has gotten to the point where it is putting out a 6255 error, the only way to to clear it is to unplug the hardware and plug it back in again.

 

Either way, an error has occurred before this one. That's the one that needs to be found and fixed.

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 8 of 18
(4,295 Views)

Check this project as I am unable to get slave response.

0 Kudos
Message 9 of 18
(4,274 Views)
Solution
Accepted by topic author Kdbrose

This vi you've attached is different to the pictures you were referring to above.

It looks like a slightly modified version of my LIN network simulator example (which works btw otherwise I wouldn't have uploaded it).

 

1. You have put a diagram disable structure around all code in the slave node configuration case (SetSlaves).  So of course they aren't going to answer.

2. Is your hardware set up as instructed and specified on the front panel?

The default values of the controls on your front panel specify: 1 x Master @ Hw0/Ch1 and 1 x Slave @ Hw1/Ch0

This implies you have 2 CANcases with the first as the Master and its second channel connected to the LIN bus and configured (pullup), then the second CANcase as a slave with it's first channel connected to the LIN bus.

Excerpt from front panel instruction:

"NOTE: For this to work in full simulation mode you must have a minimum of 2 LIN channels. One for a Master and one for a slave node. All node grounds must be linked and the Master node must have some sort of pull-up on the LIN line."

3. You will be more successful debugging and getting help with your problem if you focus on one simplest version of your code.

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