LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question concerning cRIO function

Hello,

 

I am a newcomer in using cRIO controllers. I made a project containing two vis, one running on my PC and another one running on cRIO controller (for the communication I used shared variables). Please note that in the PC vi there is a timed loop and in the controller vi there is a timed loop with the synchronized scan engine mode enabled. The two vis have a common stop. I opened the project, run both vis, then I stopped both and restarted only the PC vi. I realized that the controller could accept commands from the PC vi . Is this normal? Could somebody explain this to me?

 

 Thank you in advance

0 Kudos
Message 1 of 8
(3,522 Views)

Could you please attach your vis and project file?

 

0 Kudos
Message 2 of 8
(3,497 Views)

Hello Kate,

 

I am sorry but I can't due to confidentiallity issues. 

 

Best Regards 

0 Kudos
Message 3 of 8
(3,475 Views)

When you say "Common Stop" do you mean they both use the same shared variable to cause the VI to stop?  Are the shared variables hosted on the PC or on the cRIO?

 

This sounds like something you could debug using LabVIEW's debugging tools.  Run your VI on both the PC and the cRIO.  Probe the wire going to the stop condition in the VI running on the cRIO.  Stop the VI on the PC.  You'll see very quickly whether your stop signal is being received properly by the cRIO.

0 Kudos
Message 4 of 8
(3,465 Views)

I too am confused here. I understood everything up till "I realized that the controller could accept commands from the PC vi"

Could you clarify this?

 

Make sure if you are using a network stop shared variable, that you reinitialize it to false before you enter your timed loops,  or else they will immediately stop because they have the old value in them from the last time your program stopped.

Stephen B
0 Kudos
Message 5 of 8
(3,455 Views)

Hello, I am sorry that what I am trying to say is not clear, thus I attached images that I think can help. What I did is: open the project Home_Test and then start the Test_Home_PC.vi. Then I could open and close the DO channel 0 by the boolean shown on the Test_Home_PC.vi front panel (please see the attached pictures to understand). What I really ask is if this is normal. What I thought was that if the Test_RT_Home.vi is not running then the Test_Home_PC.vi cannot control the controller.  

 

Thank you in advance 

0 Kudos
Message 6 of 8
(3,433 Views)

My guess is that Test_RT_Home isn't reading the STOP shared variable properly, so it continues to run even after you stop Test_Home_PC.  Have you probed the output, and error out terminals, from the STOP shared variable terminal?  Also check the error terminals when you write to the STOP variable on the PC.

 

You can put all your shared variables in the same library, there's no need to have a separate lvlib for each one.

 

If possible, please don't use Word documents to attach images.  Do a search for the Code Capture Tool on this forum for an easy way to get images of your VIs, or just paste your block diagram/screen capture into mspaint and save as a PNG (GIF or JPG are also OK).  If you have too many images to upload, combine several into one image in mspaint, or zip them together, or just upload your code in a zip.  There's often no need to include an image of the front panel.

0 Kudos
Message 7 of 8
(3,419 Views)

Thank you all very much. I appreciate the help.

 

Best Regards 

0 Kudos
Message 8 of 8
(3,397 Views)