06-03-2008 05:08 PM
06-05-2008 06:56 AM
06-05-2008
07:56 AM
- last edited on
04-08-2025
03:28 PM
by
Content Cleaner
Sorry about that, my last post didn't go up right.
Hello Ron G,
Thanks for your post
I see that you are using the PCI-6289 and you are having some trouble with your counters.
First I would like to refer you to some great resources that are on the ni.com website.
So I see that you are routing the 20MHz clock to the source of ctr1. If the input you are trying to count is to the gate of that counter then DAQmx should automatically choose the clock to use for you so try not routing the signal manually. When you get this error, what specified routes is it telling you are in use? Could you post a screen shot of the error given?
Please post back if you have any other questions.
Corby_B
06-17-2008 03:59 PM
Hello Corby_B;
Thank you for your response.
I have managed to resolve the resource errors that I was getting. Apparently what was happening is the DAQmxCreateCITwoEdgeSepChan() was automatically selecting these same resources that I was then trying to manually confgure. By using the DAQmxSetChanAttribute() and referencing the assigned taskhandle for this channel I got all of the rersource errors to go away. However my application still does not work!
Presently I am trying to figure out just what signals are truly present. If I use the default terminal connections for counter measurements and can't seem to get any logic levels on the PFI terminals. For example I am trying to use Ctr0 output as the second signal input to Ctr1, (tied to its Gate). When I connect scope probe to its default output terminal on PFI12 I fail to see any signal output after I have started the acquisition tasks. I can read the motor current and read the Ctr0 output register but cannot see the Ctr0 output signal in hardware.
Attached is the latest souce code listing of my application.
I did try routing the 20Mhz clock to the source of Ctr1 using tge ChannelAttribute() which ran without errors. I also tried commenting this function call out, but it made no difference to my none functioning application.
06-18-2008 08:20 PM
06-20-2008 12:48 PM
06-25-2008
12:40 PM
- last edited on
04-08-2025
03:29 PM
by
Content Cleaner
Hello Ron G,
Thanks for your post back! I apologize for the delay in the response. Your question " Can I use this internal signal in three places? " is yes if you look at the device routes in Measurement and Automation Explorer (MAX). If you right click on the device in MAX you can see the "device routes" tab that tells you what signals can be routed where. According to this route you can make the direct connection of the Analog Comparison Event to almost every port available. So what I am going to do is get a PCI-6289 and try out your program. I was able to simulate the device and then run the program, as you mentioned I do not get any device route errors of any kind or any other errors for that matter. So I don't have any hardware at the moment to simulate your situation. You say the program doesn't work but do you at least see the analog trigger happen and then ctr 0 begin to count down? Is the major problem here that ctr 1 is not performing as you expect. I was also able to recreate your code in LabVIEW without any errors there either. As I mentioned I will be able to get a PCI-6289 today and try this out for you. I will let you know with a post back. I will simply use a function generator to simulate the input coming from your motor encoder.
Something to try is to simply export the Analog Comparison event to a PFI line that you are not using already and physically connect the signal to the counters externally with wires.
You could use DDK to develop a driver of your own for the M-series board however this is not supported by National Instruments and could be difficult if never done before.
Also you mentioned if there was a better way of getting direct support from Nation Instruments. You can talk directly to Applications Engineers if you have an SSP support contract.
I will let you know my findings once I am able to perform a test with the card you are using. I know this seems difficult but we will work together to come to a solution to your application.
Cheers!
Corby_B
07-02-2008 10:51 AM