07-24-2009 05:40 AM
Dear all,
I am using DAQ PCI-6251 card, BNC2110 connector, and LabVIEW 7.1 for collecting data from the induction motor drive system. I need to read the speed of the motor. So, I have used "Measuring position with an angular encoder" function which is supported by this card. Then, in the DAQ Assistant window, LabVIEW told me connect signal channels as follows:
The DAQ asst. in LV 7.1 says: Connect to PFI10, but I have only PFI 1 to 9 on my BNC 2120 connecting board. How can I change it?
I am using a M-series card PCI 6221. Thanks a lot Marco ----- Hello Marco. Thank you for posting to the NI Discussion Forums. You can get around this fact by routing the B input of your counter to a different PFI line. It's default is PFI10, but this can be changed with a propety node. First, after you configure your DAQ Assistant, please right click on it and selecting Generate NI-DAQmx code. This will automatically convert the DAQ Assistant to lower level VI's. Then to change the PFI line associated with the B input, place a DAQmx channel property node on your VI and change the property to Counter Input>>Position>>B Input>>Terminal. Then, right click on the property node and select "Change all to Read", create a constant for the input to the property node and select another unused PFI line. This should make your application successful. If my statements trigger new questions or need clarification, don't hesitate to ask!Brian F
Applications Engineer
National Instruments"
I have followed this advice. But I could not still see where "Generate NI-DAQmx code" is, and how can DAQ assistant understand DAQmx channel property node ? What is the connection between them ? In summary, I could not follow this answer for my work.
07-24-2009 07:34 AM
Hello,
The Generate NI-DAQmx code option is not available in LabVIEW 7.1, but there is a way round this (it doesn't have the code tidiness of 'Generate NI-DAQmx code' though).
Right click on the DAQ Assistant and click 'Open Front Panel'
Then click 'Convert' on the next window.
Then open the block diagram of the DAQ Assistant and follow the instructions about the DAQmx channel property node.
If you are unsure where to put the property node, please post your code for me to look at!
Hope this helps!
07-24-2009 07:47 AM
Hello,
I investigated further (I wasn't happy with the idea that it wasn't available) and found the option in LabVIEW 7.1!
Then:
I realised that LabVIEW 8.6 automatically goes through the extra step for you.
Sorry for the confusion.
07-24-2009 09:53 AM
Dear Mark,
Thank you very much for your solution. I followed your advice, but I could not still change the default signal connections. I can describe the problem which I want to solve as follows:
I want to read the speed of a motor from the encoder by using LabVIEW. And when I used DAQ Assistant for this, LabVIEW suggested that channel A is connected to PFI8 and channel B is connected to PFI10 as the following figure. But my BNC2110 is only from PFI1 to PFI9. So, I want to change this default signal connection. That is my problem.
After I set some parameters for this DAQ Assistant and click right on it as your advice. Actually, I could not see: "Convert to NI-DAQmx task". I could only see "Convert to Task Name Constant". I think that they are the same.
Then the following window appears:
I continue to click "OK".
Then, the following symbol appears:
Next, I click right on it as follows:
Next, the following diagram appears:
Actually, I do not understand what that diagram is. What should I do next in order to solve my problem ? So far, we have not still changed the default signal connections yet. Please help me to do this.
Thanks so much for your helps and supports.
Best regards,
Duy
07-24-2009 10:20 AM
Hello,
That diagram is the underlying code behind the DAQ Assistant, you need to modify it to do what you want:
First, find this:
And place it on the diagram. Then you need to change the value to CI.Encoder.BInputTerm, I have shown where to find this:
Then right click and click 'Change all to write'.
Then create a constant and change it to the channel you want, here is an example of the final thing:
Hope this helps.
07-27-2009 04:27 AM
Dear Mark,
Thank you very much for your helps.
But if we want to be back the window of the DAQ assistant as the following window for changing some parameters, for example: Pulses/Rev, Initial Angle, Unit, . . . How can we do that ? Please help me.
Otherwise, I do not understand why we have chosen "Example". Can we choose "Configuration", or "Configuration and Example" ?What is the "Example" for ? Can you help me to explain about this.
Once again, thanks so much for your helps and supports.
Best regards,
Duy
07-27-2009 07:04 AM
Hi,
In order to be back the window of the DAQ assistant for changing some parameters, for example: Pulses/Rev, Initial Angle, Unit, . . We can click right on DAQ Assistant >> choose Edit Task (DAQ Assistant) >> the window of the DAQ Assistant will appear. Then we can change any parameters on this window.
Duy
07-27-2009 08:46 AM
Hello,
Firstly I'll explain the difference between Example/Configuration/Example and Configuration.
Example just creates the acquisition code, but still leaves the configuration data at a higher level (A task in MAX. more on this later)
Configuration creates a lower level version of the task, this creates a VI and if you go into it's block diagram, you'll see all the configuration values as constants.
Example and Configuration creates these together.
If you use Example, so you still have a task and then go into MAX...
You'll see you have the configuration window you wanted.
Does this help?
07-28-2009 12:01 PM
Dear Mark,
Thank you very much for your explanations.
Now, I have a problem. Actually, I want to measure position in order to determine the motor speed. But I do not understand why the obtained positions are discrete values, for example: 0, 0.025, 0, 0, 0, 0, 0.025, 0.025, . . .when I run my motor. I think that these values have to be the same relatively, for example: 0.024, 0.025, 0.024, 0.024, . . . Because my motor run very smoothly.
Can you help me to explain about this ?
Once again, thanks so much for your helps and supports.
Best regards,
Duy
07-29-2009 03:14 AM
Hello,
I have noticed the BNC connector board you are using does have PFI10:
Could you try connecting your encoder to the default connections (PFI8 and PFI10), make sure it has power and ground also, and use the standard DAQ Assistant? Then let me know if you still have your odd readings.
Thanks