取消
显示结果 
搜索替代 
您的意思是: 

How to trigger a digital line?

已解决!
转到解答

I would like to use one of my PO lines to turn on a relay off/on.

 

I haven't been successful in triggering the line via a counter? I'd like to use PFI0 or PFI1

 

PCI-6035E is the card I have.

0 项奖励
1 条消息(共 19 条)
3,860 次查看

Capture.PNG

 

I tried the following but get an error:

Possible reason(s):

Specified property is not supported by the device or is not applicable to the task.

Property: Start.TrigType

Task Name: _unnamedTask<2D4A2>

0 项奖励
2 条消息(共 19 条)
3,855 次查看

You have 8 digital I/O lines on your card.  They are very easy to control.  Just look at the examples:  Help > Find Examples... Hardware IO > DAQmx > Digital Output

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 项奖励
3 条消息(共 19 条)
3,853 次查看

Yes, thank you, I was looking at the "digital-finite output.vi" but I also get an error there:

 

Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.

Property: SampTimingType
Requested Value: Sample Clock
You Can Select: On Demand

Task Name: _unnamedTask<2D4AB>

 

I can't select On Demand...

0 项奖励
4 条消息(共 19 条)
3,847 次查看

Capture.PNG

0 项奖励
5 条消息(共 19 条)
3,842 次查看
No, you can't do that. Your card has software timed digital I/O.

Please refer to the shipping examples for both counter and static digital. Please provide some details on your timing requirements.
0 项奖励
6 条消息(共 19 条)
3,833 次查看

I am not sure what you mean by 'shipping examples'

 

As for timing, I am looking at various way to trigger a relay on and off.

I need to be able to trigger the relay on for a, at most, 500ms, and have it stay off for 600000ms

0 项奖励
7 条消息(共 19 条)
3,827 次查看
Help> Find Examples. Many examples under Hardware Input and output.

If you use a digital line, you will have some jitter due to the software timing and interruptions from the os so it is important to specify the tolerance of the timing. The counter output is hardware timed so you will have much greater precision.
0 项奖励
8 条消息(共 19 条)
3,821 次查看

Dennis, I appreciate the help, I do believe you've mentioned this in another thread, but we are going around in circles.

 

I know how to trigger the relay on/off via a digital line as per the code I posted above.

I also know how to send a pulse via a counter.

 

How do I tie the two together?

 

I cannot energize the relay via the counter, but easily can via the digital line.

What I was thinking was to use the counter pulse as the timing, that tells the digital line to go HIGH or LOW.

Is this possible??

0 项奖励
9 条消息(共 19 条)
3,817 次查看
解答
已被主题作者 belopsky 接受

Your card only has software timed DIO available.  This means that you can't use any triggering or timing on the digital lines.  You just write the value you want out to the DAQmx Write and the output to write that value.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 项奖励
10 条消息(共 19 条)
3,815 次查看