Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the default signal connections

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:

 
Signal connections:
 
A: PFI8
B: PFI10
 
With this request, I could only connect the signal channel A to PFI8, but I could not do this with the signal channel B to PFI 10. Because BNC 2110 is not a PFI10. It only has from PFI1 to PFI9. So I want to change these signal connections, for example: A - PFI1, and B - PFI2. But I do not know how to do this. I have read some user manuals as well as some topics on this NI forum. But I could not still know how to change. For example: I have read a topic which was answered by Brian 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.

 
 
Can you help me to do this ? Thank you very much for your helps and supports.
 
Best regards,
 
Duy
0 Kudos
Message 1 of 25
(6,229 Views)

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'

 

OpenFrontPanel.PNG

 

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!

0 Kudos
Message 2 of 25
(6,224 Views)

Hello,

 

I investigated further (I wasn't happy with the idea that it wasn't available) and found the option in LabVIEW 7.1!

 

convertTask.PNG

 

Then:

 

taskToExample.PNG

 

 I realised that LabVIEW 8.6 automatically goes through the extra step for you.

 

Sorry for the confusion.

0 Kudos
Message 3 of 25
(6,222 Views)

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.

 

 

1.jpg

 

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.

 

2.jpg

Then the following window appears:

 

3.jpg

 

I continue to click "OK".

 

Then, the following symbol appears:

 

4.jpg

Next, I click right on it as follows:

 

5.jpg

Next, the following diagram appears:

 

6.jpg

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

0 Kudos
Message 4 of 25
(6,219 Views)

Hello,

 

That diagram is the underlying code behind the DAQ Assistant, you need to modify it to do what you want:

 

First, find this:

 

channelNode.PNG

 

And place it on the diagram. Then you need to change the value to CI.Encoder.BInputTerm, I have shown where to find this:

 

counterTerminal.PNG

 

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:

 

counterTerminalFinished.PNG

 

Hope this helps.

 

 

0 Kudos
Message 5 of 25
(6,216 Views)

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.

 

3.jpg

 

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

0 Kudos
Message 6 of 25
(6,184 Views)

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

0 Kudos
Message 7 of 25
(6,178 Views)

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...

 

maxTask.PNG

 

 

 

You'll see you have the configuration window you wanted.

 

Does this help?

0 Kudos
Message 8 of 25
(6,168 Views)

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 

0 Kudos
Message 9 of 25
(6,147 Views)

Hello,

 

I have noticed the BNC connector board you are using does have PFI10:

 

bncPFI10.PNG

 

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

0 Kudos
Message 10 of 25
(6,134 Views)