Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

how to connect four counters via SC-2345 terminal block

Solved!
Go to solution

Given

  • USB-6361 mass-termination DAQ (spec sheet)
  • SC-2345 carrier (manual)
  • 2 counter inputs: 2 X4 rotary encoders
  • 2 counter outputs: 2 PWM signals that modulate power from benchtop power supply to electromagnets

I've connected 1 encoder and 2 PWM signals to my DAQ via the carrier's terminal block (see diagram on page 28 of carrier PDF).

The encoder requires A, B, Z, 5V, and GND terminals, while each PWM output requires a "signal" line and GND.

  1. encoder 1:
    Device A - sc terminal A37/PFI 8 - DAQ PFI 8/ CTR0 A
    Device B - sc terminal C45/PFI 10 - DAQ PFI 10/CTR0 B
    Device Z - sc terminal C3/PFI 9 - DAQ PFI 9/CTR0 Z
  2. PWM 1
    signal - sc  terminal C40/PFI 13 - DAQ PFI 13/CTR1 OUT
  3. PWM 2
    signal - sc terminal A1/PFI 14 - DAQ PFI 13/CTR2 OUT

Power and ground are connected to the single power and multiple ground terminals in the carrier.

 

Problem

I need to connect another rotary encoder. I tried shifting my setup to the following configuration:

encoder 1 = CTR 0, encoder 2 = CTR 1, PWM 1 = CTR 2, PWM 2 = CTR 3

 

  1. encoder 1:
    Device A - sc terminal A37/PFI 8 - DAQ PFI 8/ CTR0 A
    Device B - sc terminal C45/PFI 10 - DAQ PFI 10/CTR0 B
    Device Z - sc terminal C3/PFI 9 - DAQ PFI 9/CTR0 Z
  2. econder 2:
    Device A - sc terminal C42/PFI 3 - DAQ PFI 3/ CTR1 A
    Device B - sc terminal C46/PFI 11 - DAQ PFI 11/CTR1 B
    Device Z - sc terminal C41/PFI 4 - DAQ PFI 4/CTR1 Z
  3. PWM 1
    signal - sc  terminal A1/PFI 14 - DAQ PFI 14/CTR2 OUT
  4. PWM 2
    signal - sc terminal ???/PFI 15 - DAQ PFI 15/CTR3 OUT

 

But the carrier's terminal block doesn't have any additional counter I/O terminals. What can I do? 

  • Is there any easy way to reconfigure one of the unused carrier terminals into PFI 15/CTR 3 OUT?
  • Should I use one of the carrier's analog or digital I/O for counter I/O?
    A cursory internet  search reveals that this is possible and discouraged for PWM control of power supplies (which is what I'm doing), so I'd use this for encoder input.
  • If I have to resort to modifying analog or digital I/O for counter I/O, what would you recommend--analog or digital?
    I'm thinking I'd use a software-timed digital input. Is this correct?

 

I'd appreciate any and all insight!

 

-Farid

 

Attached: picture of all instrument pin-outs

0 Kudos
Message 1 of 5
(5,269 Views)

Try creating a task for this setup in NI Max. Once the task is created you can view a connection diagram in NI Max which will show you how to wire your device.

 

See below a link for info on how to use the connection diagram in NI Max.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x4q4CAA&l=en-US

 

Additionally, see below a link for an example on how to create a task in NI Max.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x11DCAQ&l=en-US

0 Kudos
Message 2 of 5
(5,240 Views)

I'll try that later today, but I don't think it solves my problem.

 

MAX woul use a counter I/O for what I want to do (increment rotary input and PWM output); however, I do not have the requisite pins for another counter input or output.

0 Kudos
Message 3 of 5
(5,223 Views)

The SC-2345 can not handle four counters. However, your NI USB-6361 Mass Termination card can handle four counters. This is due to the fact that the SC-2345 was made before your card came out and was meant for cards with only two counters. I advice you visit the below url and look at the recommended connector block.

 

https://www.ni.com/en-us/shop/model/usb-6361.html

 

Again, if you create the task in NI MAX it will tell you how to wire your device. Additionally, if you are unable to physically wire the device the way you want to NI MAX won't let you create that task.

0 Kudos
Message 4 of 5
(5,195 Views)
Solution
Accepted by topic author aeroAggie

While the SC-2345 may not have been made to handle 4 counters, NI helped me make it support 4 counters!

 

It turns out I could re-route a channel's output terminal via the addition of a simple "channel node" block into my original VI, as seen in LabVIEW's built-in "Counter - Continuous Output.vi" example VI.

 

Using this method, I rerouted CTR03 OUT via PFI0 instead of PFI15 since the SC-2345 supports a PFI0 line.

0 Kudos
Message 5 of 5
(5,148 Views)