09-10-2007 12:03 PM
09-11-2007
05:39 PM
- last edited on
10-29-2025
09:40 PM
by
Content Cleaner
Hi Kannan,
I need a little more clarification on what you're having to do in Measurement and Automation Explorer (MAX) after each reboot to get your program to work. Did you receive an error when you ran the program after the restart? Could you describe your application a little bit more? You shouldn't have any problems creating a task after you reboot your computer assuming your creating the task properly. From your code, I only see you creating an counter channel task. Are you creating an analog output task?
In addition, have you tried using our shipping examples after a reboot to verify if they were able to work? I'm assuming you're using Visual C# .NET, however, please correct me if I'm wrong. The location of the .NET shipping examples can be found using the following website found here. Take a look at the images and they should help you find the exact location of your .NET examples. I would recommend starting from the examples and making sure they work. Also, there is a great article regarding using DAQmx in text based programming environments found here.
I hope this helps,
Paul C.
Message Edited by Paul C. on 09-11-2007 05:41 PM
09-12-2007 02:19 PM
Hi Paul,
Thanks for your prompt reply. Here are the details,
I'm not receiving any error/exceptions from NI libraries when I run the program after restart, also there is no trigger signal generated. I'm using this trigger for capturing image from high speed digital camera (in hardware trigger mode). I'm also generating Analogue output which is used as imput for running another device. Both CO channel and Analogue channel uses same reference clock. After restart, when I run the program, I'm getting only Analogue output but not trigger (from CO Channel).
I tested the example programs, they are working fine. The difference I can make out from the example and mine is the pulse width and frequency. In my program, the reference clock frequency is 100 Hz, Trigger pulse low time is 4 milliseconds and pulse high time is 2 microseconds. It means at every cycle, after the delay of 4 milliseconds, the camera needs to be triggered. Also I tried changing pulse high time to 1 millisecond but no effect!
Other difference is, examples (GenDigPulseTrain_Continuous/ GenDigPulseTrain_DigStart) use "CO.CreatePulseChannelFrequency()" call but in my program I'm using "CO.CreatePulseChannelTime()".
I have gone through the article you mentioned in the reply and my approach too follows the same approach. Still I'm not able to identify the problem. This occurs only when the system (hardware + computer) is restarted otherwise it is working well.
Regards,
Kannan
09-13-2007 04:10 PM
09-14-2007 01:52 PM
Hi Paul,
I'm not doing anything really with MAX, just I use it for verifying the board is working or not! When the trigger is not getting generated through program, I used to verify through MAX.
As you said, I have tried modifying the GenDigPulseTrain_Continuous sample (please refer attachment) but it is not working (after restart) and there is no error! I'm creating reference clock on /ctr0 and this reference clock is the source for my trigger channel /ctr1. Please refer the attachment.
Regards,
Kannan
09-17-2007 07:59 PM
09-18-2007 10:16 AM
Hi Paul,
Thanks for locating the problem. But this raises another design question. How can I synchronize both Camera trigger task and Analogue output channel (recall my previous mails)? In the current code, I'm using the reference clock (moRefClockTask) for synchronizing both of them. I need to send analogue output voltage and trigger pulse at the same time.
Regards,
Kannan
09-19-2007 03:48 PM
09-21-2007 02:11 PM
Hi Paul,
Your understood my objective well. I have chosen your first suggestion and verified with a scope. It is working fine (in test environment). It may take about week to deploy in the target environment. It could have turned out to be tough if I did not get your suggestion in time, thanks a lot.
Regards,
Kannan