From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

cfp-502 digital outputing TTL pulse trains

   
I tried to configure cFP-CTR-502 output discrete TTL level signal. I set the property to "discrete data" and write 1 and 0 in MAX. External power supply is 5VDC.

For 1, I get 5.1 Volts

For 0, instead of getting about 0 volt, I got a 2.7 Volt instead. The strange thing is, when I place my hands on both ends of test lead connecting to my multimeter, the voltage drops to 0.

Is this anything to do with the facting that 502 being a sinking output module?

THanks!
Toutiao
0 Kudos
Message 1 of 7
(7,048 Views)
Hi Toutiao!
 
I have been working on this exact issue, and it is related to the sinking output module.  Some of the Fieldpoint modules have sinking outputs and others have sourcing outputs.  The differences are described in part here.  In order to achieve the voltages that you want with this configuration you need to have a load across this junction.  This should explain why the voltage was showing properly when you were touching it directly.  Try using a 1kOhm resistor or larger across this and the voltages should show up just as you should expect. 
 
The manual also provides a brief explanation of the outputs of the module on page 6, here.  Hope this information has been helpful!  Have a great day!
 
Regards,
 
Jason W.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 7
(7,033 Views)


Software Configuration

>Remote System>cFP-1808-PROT-I>cFP-CTR-502@2

            >Type 1: Count Input>Count Input 0>

                        >Read Reset Mode                  Don’t Reset On Read

                        >Gate Source                           Gate Input 0

                        >Count Source             1 KHz Reference

                        >Terminal Count                       10 *

 

* Rescale Frequency = 1 KHz / [(10+1)*2]

 

>Remote System>cFP-1808-PROT-I>cFP-CTR-502@2

            >Type 1: Count Input>Count Input 0>

                        >Read Reset Mode                  Don’t Reset On Read

                        >Gate Source                           Always Enabled

                        >Count Source             Previous Channel

                        >Terminal Count                       119 **

 

** 120 counts in total due to 0 indexing

 

>Remote System>cFP-1808-PROT-I>cFP-CTR-502@2

            >Type 3: Discrete Output>Output 0>

                        >Output Mode                         Toggle, Reset On

                        >Output Source                        Counter Channel 0

 

>Remote System>cFP-1808-PROT-I>cFP-CTR-502@2

            >Type 3: Discrete Output>Output 1>

                        >Output Mode                         Toggle, Reset On

                        >Output Source                        Counter Channel 1

 

>Remote System>cFP-1808-PROT-I>cFP-CTR-502@2

            >Type 3: Discrete Output>Output 2>

                        >Output Mode                         Toggle, Reset Off

                        >Output Source                        Discrete Data

 

Jing Zhang

Staff Scientist

ESP

EMCORE Corporation

0 Kudos
Message 3 of 7
(7,006 Views)

Hardware Wiring

  1. Connect 1 Kohm (1/2 W rated) resistor between PIN 13 (Vout for output 0) and 29 (common for output 0)

  2. PIN 29 will be the “Positive”, 13 be “Negative” of the trigger input for your instrument(s)

  3. Connect PIN 14, 15 (Vout for output 1, 2) to PIN 9 (Vin for Gate 0)



Counter 0 is taking the 1KHz hardware clock as input. By setting the terminal count 10, the counter overflows and then resets every 11 (10+1) count.

 

By associating output 0 with counter 0, the output toggles every time counter 0 overflows. That is, when counter 0 overflows the 1st time, the output goes from High to Low. When counter 0 overflows the 2nd time, the output goes from Low to High.

 

By setting Counter 1 count source to previous, the counter increments each time counter 0 overflows. By setting the terminal count 119, the counter overflows and resets every 120 counts (0 indexing).

 

By associating output 1 to counter 1, the output 1 toggles each time counter 1 overflow.

 

By setting the gate source of counter 0 to gate 0, counter 0 is enabled when Gate 0 reads 1 and disabled when gate 0 reads 0.

 

Now, we route output 1 AND 2 to Gate 0. The truth table is:

 

Execution Step

Output 1

Output 2

Gate 0

Counter 0

1

0

1

1

Enabled

2

1

0

1

Enabled

3

1

1

1

Enabled

4

0

0

0

Disabled

 

Initial State = 4.

 

Execution Step 1:

[SW]    Writes Output 2 = 1 (TRUE)

[HW]   Gate 0 = 1, counter 0 and 1 start counting

            When counter 1 overflows and resets, output 1 = 1

[SW]    Read from compact fieldpoint repeatedly, when Output 1 = 1, write output 2 = 0

[HW]   Counter 0 and 1 keep counting. When counter 1 overflows again, output 1 = 0

[HW]   Now, both output 1 and 2 False, Gate 0 = 0 (FALSE), counter 0 is enabled.


Jing Zhang

Staff Scientist

ESP

EMCORE Corporation

0 Kudos
Message 4 of 7
(7,006 Views)
I have split in 2 posts, since NI does not allows my reply goes beyonds certain amount of characters.
0 Kudos
Message 5 of 7
(7,003 Views)
Configure the MAX, wire the connector block according to the previous 2 posts.

Connect the output PIN 29 and 13 to a scope.

Run this VI. You should see 120 pulses at 45.45 Hz.
0 Kudos
Message 6 of 7
(7,000 Views)

Hi Jing,

Thanks for posting your solution to the forums.  It looks like you have provided an extensive breakdown of the Hardware and Software processes necessary to set up a finite pulse train with a cFP-1808 and a CTR-502 module.  This should be helpful information for others who are trying to attain a similar behavior with these hardware devices. 

Let me know if there are other specific questions on this topic that I can help with or clarify.  Have a great day!

Jason W.

National Instruments
Applications Engineer
0 Kudos
Message 7 of 7
(6,956 Views)