06-07-2007 09:03 AM
06-08-2007 05:22 PM
06-09-2007 04:55 PM
Hello,
Rahul - please just make a zip-file of your entire project and upload it so we can look at the code.
06-10-2007 09:00 PM
06-11-2007 12:46 PM
Hi Rahul,
I have been working with your application and the analog input task is working fine with my data acquisition card. However, I did have to change the local terminal name to ai/SampleClock. I am interested to know how you are determining whether or not the analog I/O is working. If you are using the graphical indicators on the host VI, then the problem may be related to shared variables or networking issues.
Please add an indicator to the data node of the DAQmx Read.vi When you run the target VI you should see the data indicator updating. If it does not update, please go into Measurement and Automation Explorer (MAX) to determining whether or not the data is being acquired. It is possible that you are running into a hardware problem. If the data indicator does update, but the Sensor Output plot does not seem to update, then we need to look at the shared variables.
Please open the Variable Manager by going to Tools >> Shared Variables >> Variable Manager. Right-click on your shared variables and add them to the watch list. Please check if the values are updating as you run your application. Also, please note if there are any error codes associated with a particular variable.
Regards,
Elizabeth S.
Applications Engineer
National Instruments
06-12-2007 03:32 AM
Hi Elizabeth
Thanks a lot for your reply. I checked with the MAX and the device is working fine. But the target vi program was not updating the analog input indicator. I used rt communication wizerd to develop the program again and this time both AI/AO worked fine. But I changed the while loop to timed loop for control loop time and it also worked fine. But after two or three times running, the target vi no longer runs continuously and so I had to press continuous run button of the vi. This time the host vi can communcate well to the target vi and AI/AO works fine, but the stop command doesn't work for the target vi as it runs continuously. I am uplaoding the updated project with both the target vi versions. Please let me know what went wrong.
Thanks again
Rahul
06-13-2007 04:48 PM
Hi Rahul,
Your target VI stops based on your third stop condition; that it finishes late and 999 is less than or equal to i. One problem may be your use of shared variables within a time critical loop. Please take a look at the following link.
http://forums.ni.com/ni/board/message?board.id=280&message.id=2140&view=by_date_ascending&page=1
This could also be caused by the PID.vi which has performance limitations for LabVIEW Real-time. This is determined by your hardware. Which controller and PXI card are you using for this application?
Based on your fast timing settings and code within your timed loop, the application is not staying on time. If you monitor the loop time, you should see an increase in the iteration time.
Regards,
Elizabeth S.
Applications Engineer
National Instruments