01-12-2009 08:01 AM
Hi All
I had posted this before in software board but i think this board is more appropriate. I am operating a valve which uses a digital signal (1 or 0) to switch on and off. I need to vary the time it remains open from 5 ms to 100 ms. I was using 'wait until ms' block up till now but it is not very accurate.
I am attaching the final version of the program I am currently using. The daq card is pci 6516. We also have a PCI 6251 which as I understand can be used for hardware timing but am not really sure how to go about it. I would be greatful if someone could push me in the right direction.
Regards
Abhishek
Solved! Go to Solution.
01-13-2009 11:25 AM
Hi Abhishek,
You are correct in saying that the PCI-6516 is software timing only. This means that it will not be as accurate as hardware timing when you change the digital value because it is dependant on the software (which is non deterministic). So, the PCI-6251 does have correlated digital input/output (hardware timing) on Port 0. I posted a quick example of how to set this up using one of the counters on the PCI-6251 as the sample clock for the digital output.
01-13-2009 12:42 PM
Hi Jordan
Thanks for the help but actually i am running labview version 8. Can you please format the file to this version. I can't open it.
Regards
Abhishek
01-13-2009 12:51 PM
sure, here it is
01-13-2009 01:05 PM
I am having a problem testing this. On the front panel I set the frequency as 100 hz ( for a pulse width of 10 ms).
My 6251 card is set as dev2 so Couter sample clock is Dev2/ctr0
Digital Output Line is from 6151 which is Dev1/port0/line3.
Withing the block diagram I change the input of ' sample clock ' block to /Dev2/Ctr0InternalOutput
When i run this i get the following error:
Error -200077 occurred at Property Node DAQmx Timing (arg 1) in DAQmx Timing (Sample Clock).vi:2->Correlated DO.vi
Possible reason(s):
Requested value is not a supported value for this property.
Property: SampTimingType
You Have Requested: Sample Clock
You Can Select: On Demand
Regards
Abhishek
01-14-2009 12:14 PM
It looks like you have a problem with the channel names. If you are using the 6251 and it is called Dev2, then you need to use Dev2 for every channel resource. It looks like you are using Dev2 and Dev1 (im not sure what Dev1 is) when you need to only use Dev2 (which is the 6251). I attached the code again.
01-15-2009 10:53 AM
Hi Jordan
I got the program to work. However i have two more questions and it wopuld be great if you could answer them.
1. can i connect the 6251(68 pin device) to a connector block CB-37F-LP ( 37 pin screw terminal accesory).
2. Can i output a single on/off command ( i want to switch the valve on just once), instead of a pulse based on fequency as in the program.
Regards
Abhishek
01-16-2009
05:10 PM
- last edited on
01-31-2024
11:47 AM
by
migration-bot
You will not be able to use the CB-37F-LP with the PCI-6251. I would recommend using the SCB-68 or the TBX-68.
I attached another program that will output a digital high for 5ms and then a low for 100ms (like what you asked in the beginning). This is all hardware based an relies on the clock frequency and what values I am outputting. Currently the program has a clock rate of 200Hz and outputs an array of 1 digital high bit and 10 digital low bits for every clock edge. To just send one pulse out of the card you would need to just change the array that is written to the output and change the sample clock to finite samples.
05-13-2009 11:13 AM
Dear all
I have a new question related to this post. I want to operate two valves at the same time using this program. From the specifications of PCI-6251 i see that there are two 32-bit, 80 MHz counter/timers. I assume that i can use them both for hardware timing . In the current setup the signal is output at line 0 of port0. the counter used is ctr0. When i try to change the counter to ctr1( it is available as an option) I get the error attached.
Any help will be appreciated.
Regards
Abhishek
05-14-2009 12:31 PM - edited 05-14-2009 12:33 PM
I believe you are receiving this error because you are setting the counter task to use counter 1 but you are still routing the Counter 0 internal timebase to the digital task. So, since there is no counter 0 task set up, you will have no sample clock for the digital task. I attached a screenshot showing what I mean (I am assuming you are using a program similar to the last one I posted).
You should be able to use both of the counters for clocked digital generation because they are routed exactly the same way. Just make sure that you match up the counter task with the exported sample clock signal.