Jump to content

JKI Caraya on a real time target


Recommended Posts

I'm not sure if it was ever really tested to run on RT but from what I found, it doesn't seem like the Test Event Global function ever returns True from the First Call? primitive so it never actually spawns the process in the first place (once you connect to the RT target it reserves the VI for execution so maybe this has something to do with it?).

I was interested in running this on RT as well so let me know if you get that part working. Once you get that part working I still think that you would need to change "VI Name.vi" to ignore any errors generated internally. In my case, the VI throws error 53 at the property node which results in the test never being registered although I think we would be safe to ignore the error as we are just getting the VI name from the call chain in that case. Just remember to not also clear any errors coming into the VI itself.

Link to comment
  • 2 weeks later...

The core process skips showing the UI when on RT.
You can modify this in the Basic Test Manager's process by removing the conditional disable structure.

However, you should probably make a request on the open source project (https://github.com/JKISoftware/Caraya) or fork the original repo. Modifying this in vi.lib will not make it persistent and is a bad idea...

It might be that the logic could be smarter in that if the RT target does not have a UI, it would skip it, but not assume that all RT targets don't allow UIs. There might also be the possibility to modify the test suite setup to inject your own override code, for which you could simply change the behavior of the basic test manager.

2018-07-16_16-47-42.png

  • Like 1
Link to comment
  • 1 year later...

Dear Francois,

 

we tried to use the Caraya on our RT target (cRIO) based on your instructions. It kind of worked but we found some issues.

 

This is what we see after applying your code changes. It seems that Caraya is able to execute the tests because a summary is shown in the GUI (number of tests passed and failed). The problems are:

  • Details are not available (compared to the desktop mode).
  • When we try to generate a report, an error is thrown, the cRIO freezes and it needs to be restarted.

Is there a workaround for these issues? Is it possible to run Caraya "headless" (without a GUI)?

 

Best Regards,

Dániel Füleki

 

Caraya RT target issue.png

Link to comment

Hello Dániel, 

yes you can run Caraya headless starting from version 0.6 and on. You will first need to setup a Test Suite and ensure the "Interactive" flag is set to False.
This should instruct the Test Manager to run in Silent Mode (no front panel). On a Real-time target, you can get a text report setup as part of the Test Suite constructor.

There is a wiki page on github about this topic: https://github.com/JKISoftware/Caraya/wiki/Defining-a-Test-Suite
Choose the Polymorphic instance that makes the most sense for your use case (plain text or JUnit-style XML report)

Let me know if this does not work or you need more assistance.
If you think there is a bug, you can also report it directly on the issue tracking for the project: https://github.com/JKISoftware/Caraya/issues

 

 

Edited by Francois Normandin
added version number
Link to comment
  • 2 weeks later...

Do you mean that you want to output the file directly to a PC, from the cRIO?

You would have to write your own Test Report class and inject it using the "Define Test Suite" method.
If you're up to it, here's a tutorial about doing just that. (the part you need starts around 7min20) The demo shows how to create a JSON report from the provided template, but the steps are the same for writing to a database or sending your file via FTP or WebDAV.

You'll need to figure out what you need to effectively point to your PC from the cRIO (including firewall and all...), and inject those parameters in the report constructor. Let me know if anything isn't clear from the demo.

 

Maybe this thread (on the dark side) is also relevant to your question: 
https://forums.ni.com/t5/NI-Linux-Real-Time-Discussions/Send-file-from-cRIO-to-Pc-using-webDAV/td-p/3463863

Edited by Francois Normandin
added ni forum link
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.