LabVIEW Real-Time Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
gsussman

Provide a Virtual Machine (VM) in which to run LV RT systems on

Status: In Development

When developing RT code (especially system upgrades) it would be truly helpful to have a virtual machine (VMware, MS Virtual PC, Sun Virtual box, etc....) that would allow us to run the actual VxWorks OS and LVRT in it's native environment, within the Windows OS. This would allow the code to run on the actual RTOS (I realize that determinism would be scacrificed) and provide the ability to actually test the functionality of the code in the actual environment to ensure that it runs as it should. It would also preclude the need to have a bunch of RT controllers sitting on the shelf in the event that you might need them.

 

There is and emulator for PDA module, why not for RT.

Greg Sussman
Sr Business Manager A/D/G BU
40 Comments
nwxan90
Member

I have been messing around with this VM especially as most of us are working from home it has been great for doing some UI testing

 

With the announcement that NXG supports cRIO 904x and 905x series I wanted to see if I could target the VM in NXG. The issue is that the VM installs as a 903x series so its not compatible. The option to image it with NXG is greyed out from NI MAX.

 

I have however successfully managed to change the VM into thinking it’s a 9040 by editing some of the boot files from the 903x image. (I’ve listed the changes at the end if anybody else what's to test)

 

It allows for the VM to be imaged with an NXG image as below!

Small Screenshot 2020-06-03 at 12.52.23.png

 

However unfortunately when you attempt to add it to an NXG project via its IP address it shows as the model of virtualbox and times out before you can add it to NXG

Small Screenshot 2020-06-03 at 12.57.18.png

 

I have tried making the VM in VMware Fusion and oracle VirtualBox and both times the same result. So looks like it’s not possible to use it with NXG for now.

 

Modifying the VM to make it a 904x does show as a system link target and also allows for install of DAQmx. I haven’t done much testing of it yet though

 

 

For reference the changes required are:

  1. Open and edit the file boot/grub/grubenv
    1. I would recommend making a copy of the file first or having a snapshot to go back to
  2. Change the device code for a 9040 the code is 0x78E3 (I think)
    1. Device codes are in /usr/local/natinst/bin/TargetID Arches.csv
  3. Change Device Description to NI-9040
  4. Optional change hostname
  5. Format Disk from NI MAX
  6. Add and remove software
  7. Select an image and a programming environmentnwxan90_3-1591260467507.png

     

 

I am not sure if my issue with targeting in NXG is because I am running my windows install also from a VM or if its an issue with my windows firewall. I am going to try and grab some files off a legitimate 9040 cRIO and compare them to my edits


Certified LabVIEW Architect, Certified Professional Instructor

CLA CPI

fmorandat
Member

Hi,

A NXG VM is a very good new.
I can't wait to try it !

I tried to get a VM recognized by NXG 4.0 some months ago, but I never succeeded.
I tried with legitimate files (to get a "application does not support the system" error) in a "PXI System Link" VM, and did the same by installing the 903x distribution on real hardware to have a different model of network card (not a virtual one).

Even if on the real hardware the error is not the same, all finished in the same way : NXG try to connect to LinuxRT with a PAM Authentification which fail : the connection for root user fail, then the connection for admin user becomes active, and finally a deconnection is sent by the host (see /var/log/auth.log for details).

I played fastly with the pam scripts in /etc/pam.d, but it led to nowhere.

I was waiting NXG 5.0 to retry (but now I wonder what will happen if I change the PXI for a 9040).
If you try, I would be interested by your results.

nwxan90
Member

Hi André 

 

Just to confirm you are not able to target the VM in NXG either?

 

I have discovered that if you install the LabVIEW 2020 image onto the Vm once its configured it shows up in NXG! However 😞 it has an error that the software is not compatible

cRIO VM Connected .pngimage.png

The VM just appeared in the Live View Tab

 


Certified LabVIEW Architect, Certified Professional Instructor

CLA CPI

fmorandat
Member

nwxan,

 

Maybe it's just too early.
But I think there's big steps here, and some good news.


It's hard for me to follow you, I would like to be sure :
- So, a "standard" LabVIEW 2020 VM is recognized by NXG 5.0, but with software issues ?
- Your last update said that finally you can see the NXG image in the live view tab, but how ? It was your windows install/firewall issue ?
- Which VM software do you use if VMware Fusion and VirtualBox don't fit ?
- Which legitimate files are you using, if you use some ?

andre.buurman@carya
Active Participant

Could it be related to the fact that part of the system that is available in real HW, like FPGA, raises an internal error preventing it to continue?

Regards,
André (CLA, CLED)
andre.buurman@carya
Active Participant

It somehow relates to the fact that discovering the cRIO Vm in e.g. LV 2020 in a project (add target - discover). This fails.

Adding the device and then entering the IP address makes it work as expected.

 

Somehow NXG is trying to be too smart for us and alwasy wants to discover itself instead of trusting us and have us just configure the IP settings in design mode and have it be connetable.

 

Somehow the discover function doesn't find everything it wants and errors out.

Regards,
André (CLA, CLED)
andre.buurman@carya
Active Participant

White smoke for a Virtual cRIO in NXG 5.

 

I changed DeviceDesc to NI cRIO-9053 (don't know if it was necessary.

I remove the host-only network card from the VM, so it only had the bridged card.

Using the add HW with the found cRIO didn't work (not compatible), but the adding by IP address seemed to work.

From live via to design view it showed as "no match", so I disabled hardware matching (orange symbol).

Somehow it now allowed me to run a VI on the target and build and run the exe on the target.

 

The RT app (rtexe) using the SystemLink message API to continuously send it's current time and the client app running on Windows subscribed to the message topic and displays the time. The SystemLink server is our demo server running somewhere on the web, so communication between VM and Host is going over the internet.

 

NXG 5 cRIO in VM.PNG

 

Question remains: Why can't NXG match the hardware? What properties does it use to match?

Regards,
André (CLA, CLED)
fmorandat
Member

That's true, the 8135 maybe is not supported anymore today in fact ^^'. The PXI device in the TargetIDArches.csv is ok I guess. Quite a useful file.

 

André, how do you do to disable the hardware matching ?

About the property, maybe NXG checks the FPGA part.

andre.buurman@carya
Active Participant

It's the orange symbol in design view that is above the looking glass. It's a menu.

Regards,
André (CLA, CLED)
andre.buurman@carya
Active Participant

What host name rules do you use to get matching to work?

Regards,
André (CLA, CLED)