From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How can Ctr0 Internal output be disconnect from PFI12?

Hi,
Using
0 Kudos
Message 1 of 9
(4,586 Views)
Message POST continued:
 
I am using a 6281 card:
Port 0 is being used for digital i/o pattern generation and acquire
All of Port1 and Port 2 are being used to drive relays on an applicaion board.
 
I am using the Ctr0 Internal output as a clock for a digital pattern output on Port 0, the problem is that Ctr0 out also appears on P2.4 ( It's default location).
I have tried:
DAQmxDisconnectTerms ("/Dev1/Ctr0InternalOutput", "/Dev1/PFI12");
DAQmxConnectTerms ("/Dev1/Ctr0InternalOutput", "/Dev1/RTSI0", DAQmx_Val_DoNotInvertPolarity);
 
But neither of these stops the Ctr0 out appearing on a pin which I need to use as a relay driver.
 
Please can you tell me how to re-route this signal?
 
Thanks
0 Kudos
Message 2 of 9
(4,583 Views)

I remember a similar question being answered some weeks/months ago, but I can't seem to locate it.  I also *think* it gave a LabVIEW solution, though it's probably analogous.

In any event, my less-than-perfect memory tells me that you use an empty string in a call to ConnectTerms or ExportSignal.  I don't recall whether you specify the InternalOutput and route it to void (""), or whether you tell it that void ("") is what gets routed to PFI12.

Give it a try or see if you can search better than me at the old answer...

-Kevin P.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 3 of 9
(4,577 Views)

Hi Kevin,

Using the ("") in either DAQmxConnect or DAQmaxDisconnect returns an error "Terminal for the device invalid. Terminal: empty string". I tried ("NULL") with similar results.

I've pasted the function helps below.

DAQmxConnectTerms HELP Creates a route between a source and destination terminal. The route can carry a variety of digital signals, such as triggers, clocks, and hardware events.These source and destination terminals can be on different devices as long as a connecting public bus, such as RTSI or the PXI backplane, is available. DAQmxConnectTerms does not modify a task. When DAQmxConnectTerms runs, the route is immediately reserved and committed to hardware. This type of routing is called immediate routing."

DAQmxDisconnectTerms HELP Removes signal routes previously created using DAQmxConnectTerms. DAQmxDisconnectTerms cannot remove task-based routes, such as those created through timing and triggering configuration.When this function executes, the route is unreserved immediately. For this reason, this type of routing is called immediate routing…….

Do these statements mean it is not possible to disconnect a destination if it is being used by a task, but only routes created using immediate routing? Surely this cannot be the case, otherwise all the default locations for ctr0 and ctr1 prevent a total of 8 PFI’s being used when counter functions are required.

At the moment I cannnot find a solution, any help you can give would be great.

Thanks Andy

0 Kudos
Message 4 of 9
(4,567 Views)


Using the ("") in either DAQmxConnect or DAQmaxDisconnect returns an error "Terminal for the device invalid. Terminal: empty string". I tried ("NULL") with similar results.

[is it] not possible to disconnect a destination if it is being used by a task, but only routes created using immediate routing? Surely this cannot be the case, otherwise all the default locations for ctr0 and ctr1 prevent a total of 8 PFI’s being used when counter functions are required.


1. Have you tried the "" trick with a function named something like 'DAQmxExportSignal' (not sure of actual name)?.  No promises, but it's one more thing to try...

2. I'm not an expert on routings and connect / disconnect, but I'll describe what I *think* I know.  It's helpful to think in terms of scope or duration.  There are certain types of routings or connections that have what we might call "task scope."  An internal "connect" happens when the task is configured and a "disconnect" happens when that task is cleared. Some function exists for specifying this kind of task-level routing.  It may even be the "ExportSignal" function.  I'd guess the best clue is that the function will require some kind of DAQmx Task specifier in its list of input parameters. 

 It sounds to me like the Connect / Disconnect functions have what we might call "system scope."  An internal "connect" happens immediately and will persist as various tasks come and go.  It won't clear until there is an explicit "disconnect" call or the board / PC is rebooted.

3. It's probably true that any routing reserved by a task cannot be disconnected with the immedate call to Disconnect.  There should be some *other* function call that would re-route or prevent that task-level connection, provided the function is called before the task is committed / started.

Hopefully, someone can answer this stuff more authoritatively...

-Kevin P.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 5 of 9
(4,546 Views)
Hi all,
 
Have you tried using DAQmxSetCOPulseTerm with the empty string "" ?
 
The forum post which I think Kevin is referring to can be found here:
 
 
and it describes using the channel property node in LabVIEW to achieve this disconnection.
 
Best wishes,
 
Mark
 
 
Message 6 of 9
(4,536 Views)

Yep, that's the post I remembered.  Hope it works here...

-Kevin P.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 7 of 9
(4,533 Views)
Hi
I would like to try this but, I cannot find the function in my DAQmx lib. If I type the code in just after creating a task which uses ctr0 it compiles OK but when the code is ran an error is flagged " specified channel is not in task".  Any ideas?
 
Thanks Andy.
0 Kudos
Message 8 of 9
(4,529 Views)

Hi Andy,

What API are you using, is it CVI or DAQmx using Microsoft tools? The function is referenced in the DAQmx C API help, which you can find by browsing through Start-Program Files-National Instruments-NI-DAQ-NIDAQmx C Reference Help.

Have a look under the tree under NI-DAQmx C Properties - List of Channel Properties - scroll down and find Counter Output, Pulse, then Output Terminal. This will describe using this command (and others) to set and reset the properties of the output channel.

The error sounds more like a problem with the parameters you're passing the function. Please have a look at the reference help and see if this points you in the right direction.

If you're still having problems, please post the code and what API you're using and I'll have a look at it for you.

Best wishes, have a good weekend!

 

Mark

0 Kudos
Message 9 of 9
(4,525 Views)