03-29-2010 07:56 AM
Hi,
Can any one explain me how to use the signal routing function in DAQmx i.e.
Some example program would be very helpful.
Regards,
Priya.
03-29-2010 09:54 PM
Hi Priya,
i did not get wat exactly you need. Please explain it clearly so that i can help you.
Regards
rams
03-29-2010 11:12 PM
Actually i want to connect two sources terminals using ConnectTerminals(), say Counter i/p and Counter o/p, and perform some operation eg. edge counting. Is this possible? Can i connect programmatically (NOT through external loopback) any 2 counters in PXI-6229 or is there only a particular manner to connect?
In short, I want a example program which demostrates the usage of ConnectTerminals() and DisconnectTerminals() APIs.
03-29-2010 11:14 PM
03-30-2010 03:35 AM
Hi priya,
I don't know weather I understood your question or not. But I need to know what you will do connecting two terminals internally (that is in software) even though it is not possible to connect like that.
Regards
Rams
03-30-2010 04:13 AM
I want to generate digital pulses in one counter and count the number of edges in the other Counter. For this i need to use 2 counters say ctr0 and ctr1. Now, I will NOT be looping them externally instead i will call DAQmxConnectTerms on the two counters (which i guess, will setup a internal loopback between these 2 counters) and then generate pulses and count them. This is what i am trying to do. Pls let me know is it possible to do using that API.
Regards,
Priya.
03-30-2010 05:38 AM
03-30-2010 11:11 AM - edited 03-30-2010 11:12 AM
Hi Priya,
In general you should avoid connect/disconnect terminals. They are used to create/destroy a semi-permanent route that is not tied to a DAQmx task. My understanding is that you want to generate a signal using one counter and count it using another. You can do the routing you want through the normal counter API by setting the edge counting source to be CtrNInternalOutput.
Here's a screenshot of what it looks like in LabVIEW.
03-30-2010 11:20 AM - edited 03-30-2010 11:21 AM
Hi Priya,
While it is possible to use the Connect Terminals functions to accomplish what you need, the preferred method is to simply tell your Edge Count task to count the InternalOutput of the other counter. You can do this with the DAQmxSetCICountEdgesTerm function, assuming you are using the C API. For example:
DAQmxSetCICountEdgesTerm(gTaskHandle, chan, "/Dev1/Ctr1InternalOutput");
The Connect Terminals function is not tied to a specific task so it is easy to leave terminals connected by mistake (a device reset will take care of any undesired connections that might remain if you forget to Disconnect the terminals). For this reason it is generally recommended to use the above method to connect the two lines rather than the Connect Terminals function.
*Edit: I just saw Mark beat me to it. Nonetheless it looks like you are using the C API so I'll keep my post up as well.
Best Regards,
03-30-2010 11:35 PM
Hi John,
I do know there are better methods to do edge counting than using the Connect Terminals function but as i said i need to "test" the Connect Terminals API through some means. If you have a better example through which i can test the API as well as understand its usefulness, I will be grateful if you can provide me the sample code in CVI.
Thanks,
Priya.