03-05-2014 04:19 PM
Someone who can help me please?
 NIquist
		
			NIquist
		
		
		
		
		
		
		
		
	
			03-05-2014 04:42 PM
I think I see your problem after looking into your modules. You don't have any digital I/O on your modules so you're wanting to use the BNC PFI lines on your chassis correct?
03-05-2014 04:54 PM - edited 03-05-2014 04:55 PM
Yes sir. Is this possible? I am using the CDAQ 9178 chassis
 NIquist
		
			NIquist
		
		
		
		
		
		
		
		
	
			03-05-2014 05:12 PM
This doesn't look promising   : http://forums.ni.com/t5/LabVIEW/How-to-access-digital-input-on-9205-module-in-9172-cDAQ-chassis/m-p/...  Maybe contact an NI rep to be sure unless someone else chimes in...
: http://forums.ni.com/t5/LabVIEW/How-to-access-digital-input-on-9205-module-in-9172-cDAQ-chassis/m-p/...  Maybe contact an NI rep to be sure unless someone else chimes in...
One option of course is to simply collect data continuously and don't save what you don't want. Or collect and save constantly and edit the data later.
Another possibility is to press the digital lines of your PCs parallel or serial port into service. Parallel is easy, you can read the lines directly but you can actually read the bi-directional data and status lines on the serial port as well. See the example called Serial Port Monitor.vi. What is the physical source of the digital signal you planned to use to start/stop logging?
Or...   You can always buy an appropriate new toy to put in your cDAQ chassis. 
 RikPrins
		
			RikPrins
		
		
		
		
		
		
		
		
	
			03-06-2014 06:15 AM
One soultion to this is indeed using a Digital I/O module to read out (static) a digtial line and control your case structure with that.
You can also setup a pause trigger. You cannot do that with the DAQ assistant but you can with the DAQmx API. I have attached a VI that shows how to do this. I have configured a cDAQ-9178 with a NI 9219 in slot 1. The pause trigger comes from PFI0 on the Chassis. I have made this VI without having HW to verify its behavior so you might first test it. The way I think it should work is: You connect your digital sigjnal to the BNC conector of the Chassis. Point the channels fo the VI to the correct HW channels in your chassis. Run the VI. The behavior should now be that the task is measuring when the signal on PFI0 is high and should be pausing when it is low. The DAQmx read VI will produce a timeout error after 10 seconds when no data is available. That error should be handled and ignored so the DAQmx read VI is waiting for new data again. I did not implement that yet. Could you first try if the VI works like it should?
Let me know the results!
 RikPrins
		
			RikPrins
		
		
		
		
		
		
		
		
	
			03-07-2014 04:49 AM
Hello,
I got access to some HW so I tested it out and it works quite nice. I also added real simple logging and error checking. The VI now logs when there is data. When the trigger is set to low the DAQmx Read VI gives an error which I clear (only the specific timeout error since that is what I expect to happen.) All other errors will still be handled and will stop the loop. I set the timeout value to only half a second since that allows you to stop the VI with the stop button quite quickly.
You will find the VI (with the ignore specific errors VI) in the attached zip file. Let me know if there are any questions.
Regards,
 NIquist
		
			NIquist
		
		
		
		
		
		
		
		
	
			03-10-2014 09:44 AM
Very nice Rik. I think I need to look into some cDAQ hardware for future projects.
03-10-2014 02:08 PM
Hello,
I got a digital input module now 
Thank you for the help!
 RikPrins
		
			RikPrins
		
		
		
		
		
		
		
		
	
			03-11-2014 03:20 AM
Thanks NIquist and Stephny, good luck with you application.
Regards,