LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicating with a CAMAC 6001 controller

Hello all,

 

I am working on a project with the physics department at the University of Alabama and am updating some old DAQ codes to interface with labview.  I am using labview v8.2 in a kubuntu linux environment v8.0.4.  I am attempting to get labview to call pre existing C/C++ codes that communicate and take data from a CAMAC 6001 controller through a parallel port interface.  I have tried recompiling these codes with labview using the Code interface node.  It appears that the code compiles correctly, but when the program is run there is a sementation fault and labview crashes.  It does this when it gets to the part of the code that actually communicates with the equipment.  I also tried using the system exec vi to launch my functional C++ code from a shell.  This again results in a segmentation fault.  It appears that labview does not want to communicate with this piece of equipment.  Does anyone have any thoughts?  All I really want is a solution where labview, which handles the user interface now, can launch my C++ code in a separate window, and then have nothing to do with it.  Once the DAQ code is running it does not need to interact with labview in any way.  We have not found a way to do this yet, although it seems like it should be a simple matter.  Any thoughts would be greatly appreciated?

 

Thanks

0 Kudos
Message 1 of 4
(1,635 Views)

What about using a shell script to open a new instance of the terminal?  Call a shell script from LabView, and in that script, source the execution of your DAQ code to a new shell.  If that doesn't work, try running a system() call inside a simple program--one that LabView will run--and execute the DAQ code in that call.  Ie., have LabView call a "hello world" program, in which you have a line like:   system("./myCompiledDAQCode");

 

Hope that works.

0 Kudos
Message 2 of 4
(1,610 Views)
Thanks for the suggestion.  I tried that and I was able to get a new terminal to open, but only for an instant.  I now use labview and pass a command to the system exec vi which runs a shell script.  This script opens a new terminal and attempts to run the DAQ code.  However, this terminal flashes open but then closes immediately.  So a second new terminal appears for an instant but does not run the DAQ code.  Ive tried to add pause and sleep commands to the shell script but these also fail to keep the window open.  Any suggestions?
0 Kudos
Message 3 of 4
(1,580 Views)
I am no LabView expert, so I am probably at the end of my usefulness.  Is it possible that LabView is only waiting for a successful return code on the execution of the shell itself, since that is all that you asked LV to do?  LV would thus retake control and close the terminal as soon as it receives that exit status flag, before the DAQ code has time to run, since that is probably an arbitrarily long span of time, correct?  I would be interested to know what does work, and perhaps you should try the developers at this point.  Good luck with the project.
Message Edited by mohughes on 07-07-2009 11:28 AM
0 Kudos
Message 4 of 4
(1,518 Views)