From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

CAN-frame not being executed in State machine, running from PC.

I use the state machine templates adapted for real time systems. Where the UI part, i.e. where the user inputs actions as well as gets data is in VI called "host" it is also where the project is started and stopped from.

 

My system consists of a PC, myRIO and an X-CAN interface and a controller for an EC motor.

 

In target.VI I have different operations my embedded device should do (myRIO in my case) the idea is that the initialization phase it should send a CAN frame that goes to the controller and makes the controller to be set to position control.

 

The problem for me is that when I run from host which is what I want to do the program is initialized but my CAN frame is not sent but on the other hand if I run the program from target which I don't really want then my CAN frame is sent. I have double checked this in an external CAN monitoring program.

 

I suspect that I should broadcast the CAN frame as a shared variable. The only problem is that the format that my CAN session is in is not valid format in having a shared variable.

 

Has anyone been in similar scenario and if so how did you solve it?

0 Kudos
Message 1 of 1
(486 Views)