10-29-2012 03:43 AM
Hi all,
I try to use smart camera Ni 177X series to work on a project, and when I finished my application on VBAI and tried to migrate it into labview , something went wrong.
The migration itself is working good, but after the migration, I can't get the image at all.
I checked the IMAQ plug in I might need, My IMAQ version is 4.7 and IMADdx is 4.0. They should be fine.
and I found out from the block diagram that during the "Setup Cleanup" function, an error occured
Error -1074397163 occurred at IVB IMAQ - Clear Triggers.vi
Possible reason(s):
NI-IMAQ: The passed in interface or session is invalid.
I think that's why I can't get the image, but I have no clue how to fix it, does anyone know how to fix it?
Thanks in advance.
Solved! Go to Solution.
10-29-2012 08:19 AM
To run a LabVIEW VI on a smart camera, you actually need to connect to the smart camera in LabVIEW. To do this:
1 - Open a new project. Right click on the Project at the top of the tree and select New>>Targets and Devices... Select your smart camera and if you get a dialog asking which mode you want to open it in, select Real-Time mode (you will LabVIEW RT installed).
2 - Right click on the smart camera in the project and select Add>>File and add the top level VI of the generated code.
3 - Now you should be able to open that VI and it will be associated with the Smart Camera, so you shouldn't get errors now.
Running this VI will stop Vision Builder AI on the target. To start Vision Builder AI on the target, sometimes rebooting will do it, but the LV project may have changed the target so VBAI is no longer the startup app. To change VBAI back to the startup app, you can go to VBAI, right click on your target in the splash screen. You will see a button to "Set VBAI Startup" and if you click this, then VBAI will be the start up application again.
Another option would be to use the API to control the VBAI engine on the target. This method would always keep the engine running on the target so you don't have to worry about turning VBAI on/off as the start up app. You also can easily change your inspection from VBAI and don't need to regenerate LV code. You can find an example of how to run VBAI inspections on a Smart camera/RT target using the LV API under your <VBAI Folder>\API Examples\LabVIEW\LabVIEW API Example (Remote).vi
Hope this helps,
Brad
10-29-2012 12:25 PM - edited 10-29-2012 12:27 PM
Hi Brad,
Thanks for answering, but now there is another issure jumped out.
while the deployment process, the conflict message showed that
Access denied: This target is running a version of LabVIEW Real-Time that is different than the Real-Time Module software on the host computer.
You can verify the version and reinstall the Real-Time software using Measurement & Automation Explorer.
So I tried to use MAX to see what I can do,
I tried to reinstall
NI Vision RT 11.0.1.3.0 to 12.0.0.3.0 and
NI IMAQdx RT 3.9.1.3.1 to 4.0.0.3.0
then I saw the waring message
Cannot continue because of the following unresolved dependencies:
Vision Builder AI 4.2.1 requires LabVIEW Real-Time 10.0.1
Variable Client Support for LabVIEW RT 1.7.1 reqires LabVIEW Real-Time 10.0.1
How can I solve this dependecy issure..?
PS some how I changed to LabVIEW 2012 instead of 2011.
10-29-2012 12:36 PM
This is another reason I would recommend using the API. If you migrate to LV, you will need all the right versions of LV/RT/Vision/etc. If you use the API, you won't have to change anything on your target, and you can use whatever version of LV you have (assuming the API is installed in that version of LV). The LV code you write will run on Windows, but will control the VBAI engine on your target and get results and images. To get your Smart Camera back in a good state, open VBAI, select your target from the splash screen and there should be a button to "Install Software". When you click on this, make sure NOT to check the box to reformat your target or else you will lose any inspections you have written. Unless there's a really good reason to not use the API, it sounds like this option will be much easier for you.
Hope this helps,
Brad
10-29-2012 01:19 PM
Thanks a lot Brad,
The API way really helps!!
I really appreciate that.