LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D Picture Control and vrml import LabVIEW 8.6, does it work or not

Hi all
 
I have been surfing around for a while to find out how to import vrml (3D cad files) into LabVIEW from e.g. SolidWorks, and myself and many other cannot get this to work, so now I want to figure out if and why, this seems to work for some and not for others.
 
What I have found out and tried so far.
I use LabVIEW 8.6. I don't know if 3D picture control is a common part of the main package of LabVIEW now, but I have access to VIs as Load VRML File, 3D Picture Control, Draw Scene and Object functions etc so I presume it is. I say that I don't know if it is a common part of LW now, because I have seen earlier version and links to evaluation version of 3D Picture Control, you had to download. Can someone clarify?
 
Ok, I have tried to export a 3D cad model (10x10x10mm cube) from SolidWorks 2007 and 2008 to vrml in version vrml97 and 1.0. I have read that vrml97 should be the only one that works, but I can't seem to get any of them to work.
I have tried in LabVIEW 8.5 and 8.6, and none of them worked.
 
So know I encourage people to write their own experience and post a simple VI + vrml, that work or don't work, and then HOPEFULLY someone can figure out what is wrong and most important of all,  how to get it to work.
 
Please supply
LabVIEW version
e.g. SolidWorks version (2007, 2008, student/academic)
vrml version (vrml97 or 1.0)
 
I have attached a VI (LabVIEW 8.5) and vrml97 file (10x10x10mm cube). This returns an error for me that says, Corrupt file. Is the file programmed wrong to get the 3D cube to show?
 
Best regards
Simon Bøgh
MSc. Eng. Manufacturing Technology
Message Edited by SCMAJA on 02-08-2009 04:14 AM
LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 1 of 9
(7,207 Views)

The 3D Picture Control was instroduced as part of LV Full Development System (FDS) and Professional Development System (PDS) in LabVIEW 8.2. Previously you could have that with the 3D Picture Control Toolkit.

 

LabVIEW only supports VRML 97 (version 2). To use version 1, you have to convert that with external software.

 

I tried to open this File in LabVIEW 8.6 and 8.5 and I don't see the error you are reporting. I am able to get the cube as expected, however, the color for Y and Z was very light. You would have to create lights to make this show properly. Just altering this to

 

color [
 0.937255 0.937255 0.937255

 

Helps showing it correctly. Also, because the camera is fixed to one of the faces of the cube, you have to "camera controller" to "spherical" (just right click to the picture). Also, to be able to manipulate the image to see different angles, you can press <CTRL>-<M> and use the cursors and tools on the graph. This is equivalent to run the VI continuously, but without reopening the file every time.

 

Now, if you are getting "corrupted file", try to remove the toolkit (it sounded that you had this installed). They share some inderlying VIs that were fixed with new versions of Native 3D picture control.

 

I personally used the import VRML to create animations of control systems for Control Design and Simulation Module and we have several examples that use it. If you have access to this module, I would advice you check the examples and verify how you can manipulate the image to have realistic experience.

 

Let me know if you have more questions and I will be happy to help.

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 2 of 9
(7,164 Views)

Hi Barp

 

Thank you for your response, it was very helpful.

 

I tried to remove the whole LabVIEW installation and then I only installed LV 8.6.1 and the Control Design and Simulation Module 8.6.1. Now I do not get the error anymore but I still cannot see anything, perhaps because of lighting. Therefore I tried opening the Inverted Pendulum example supplied with the CDS module, which opens and runs fine, but the only thing I can see in the model window is the object defined in labview, not the object from the lip.wrl file. See attached jpg.

 

I have update my graphics driver, so I do not think it would be it.

 

Any suggestions what is wrong?

 

Best regards

Simon

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 3 of 9
(7,113 Views)

That is strange. This examples always worked for me. Maybe you could have some problem with the video card you are using. Did you try to run the same example in another computer? What is the video card you have? In some cases, the vendor use some optimization for video cards that affect some applications. For the sake of testing, can you verify if you have that enabled and, if yes, disable and see if you can see the example working.

 

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 4 of 9
(7,085 Views)

Hello Barp

 

I still got graphics problems running the pendulum example in Labview, please see attached image.

 

I have tried on three different computers running the same installation of Labview.

The computers had these different gfx

  • nVidia Geforce 9400M
  • Intel Q33 Express Chipset
  • ATI radeon 9700 Pro

I also tried turning of any special optimization in the driver.

I can run the Bouncing Ball example with no problems, but as I can see, this does not consists of any imported VRML files, but Labview 3D elements, is this correct?

 

Best regards

Simon

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 5 of 9
(6,300 Views)

Simon,

 

I just noticed what is the problem with your animation. You have the decimal point as comma (",") instead of period (".").  If you change your system to use ".", it should work.

 

Sorry that took so long to give you a response. I should have been more careful in looking at your screenshots.

 

Please let me know if that helps!

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 6 of 9
(6,288 Views)

Well spotted! it works now 🙂

 

However, how come it doesn't work with my own system settings (DK), other examples I have tried, LabVIEW finds out whether to use "," or "." according to system settings?

 

Is there a way to get the example to work with my own system settings?

 

Ones again, thank you.

 

Best regards

Simon

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 Kudos
Message 7 of 9
(6,273 Views)

You are correct, these was suppose to work and it is already captured in our database to be fixed in future release. However, that is not fixed in LabVIEW 2009.

 

Another possibility (if you don't want to change your computer settings is to unckeck the option in "Front Panel" >> "Use localized decimal point*". That way, LabVIEW will ignore your settings and the VI should work as expected.

 

Let me know if I can help further.

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 8 of 9
(6,263 Views)

Hi,

 

I  export a cad file from solidworks as vrml to labview. It is a robot but when i try to move it runs very slow. I thought it was my laptop graphic card but I have an NVIDIA and I only loaded 6 files.

 

regards,

Ivan Herrera

0 Kudos
Message 9 of 9
(4,043 Views)