LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Kvaser leaf CAN inverter with Labview application

Hi

I am working with two motor controllers in the CAN network, so I downloaded an application (attached) from KVASER's site which is suitable for the inverter I have.
I should get speed data from one controller and update the second controller so that there is a uniform speed.
I entered parameters, send a request and get a response from one controller. I need to send the answer to the second controller, but I can not isolate the DATA from the output string.
Also, There seems to be a lock in one of the VI's  because I am unable to add probes to some internal VI's.
Also, how can I update the second controller every 10 milliseconds?

 

Thanks

Yonatan

0 Kudos
Message 1 of 2
(1,139 Views)

Hi Yonatan,

 


@rivlin wrote:

I need to send the answer to the second controller, but I can not isolate the DATA from the output string.


The "output string" is created by the kvCanMsgDisplayBox function - from the outputs given by kvCanRead!

Why don't you use the "Message data" output of that CanRead function?

 


@rivlin wrote:

Also, There seems to be a lock in one of the VI's  because I am unable to add probes to some internal VI's.


Check the VI properties: is debugging en-/disabled in those VIs?

 


@rivlin wrote:

Also, how can I update the second controller every 10 milliseconds?


You may try to send a CAN message each 10ms using a parallel loop.

When the Kvaser API allows you can setup a periodic CAN message, which is sent by the CAN controller each 10ms and only update the message data as needed…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(1,091 Views)