LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger a digital line?

Solved!
Go to solution

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 Kudos
Message 1 of 19
(2,973 Views)

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 Kudos
Message 2 of 19
(2,968 Views)

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 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 3 of 19
(2,966 Views)

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 Kudos
Message 4 of 19
(2,960 Views)

Capture.PNG

0 Kudos
Message 5 of 19
(2,955 Views)
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 Kudos
Message 6 of 19
(2,946 Views)

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 Kudos
Message 7 of 19
(2,940 Views)
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 Kudos
Message 8 of 19
(2,934 Views)

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 Kudos
Message 9 of 19
(2,930 Views)
Solution
Accepted by topic author 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.


GCentral
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 Kudos
Message 10 of 19
(2,928 Views)