06-29-2021 10:32 AM
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
06-30-2021 02:35 AM
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…