Advantech manual Counter Modes, PCM-3780 Counter Mode

Page 11

Counter Modes

Table 1.1: PCM-3780 Counter Mode

Counter Mode

A

B

C

D

E

F

G

H

I

J

K

L

 

 

 

 

 

 

 

 

 

 

 

 

 

Special Gate (CM6)

0

0

0

0

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

 

 

Reload Source (CM5)

0

0

0

0

0

0

1

1

1

1

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

Repetition (CM4)

0

0

0

1

1

1

0

0

0

1

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

Gate Control

N

L

E

N

L

E

N

L

E

N

L

E

(CM15~CM12)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Count to TC once, then

Y

Y

Y

 

 

 

 

 

 

 

 

 

disarm

 

 

 

 

 

 

 

 

 

 

 

 

Count to TC twice, then

 

 

 

 

 

 

Y

Y

Y

 

 

 

disarm

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Count to TC repeatedly

 

 

 

Y

Y

Y

 

 

 

Y

Y

Y

without disarming

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Gate input dose not gate

Y

 

 

Y

 

 

Y

 

 

Y

 

 

counter input

 

 

 

 

 

 

 

 

 

 

 

 

Count only during active

 

Y

 

 

Y

 

 

Y

 

 

Y

 

gate level

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Start count on active gate

 

 

Y

 

 

Y

 

 

 

 

 

 

edge and stop count on

 

 

 

 

 

 

 

 

 

 

 

 

next TC

 

 

 

 

 

 

 

 

 

 

 

 

Start count on active gate

 

 

 

 

 

 

 

 

Y

 

 

Y

edge and stop count on

 

 

 

 

 

 

 

 

 

 

 

 

second TC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Start count on active gate

 

 

 

 

 

 

 

 

 

 

 

 

edge and stop count on

 

 

 

 

 

 

 

 

 

 

 

 

inactive gate edge

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reload counter from Load

Y

Y

Y

Y

Y

Y

 

 

 

 

 

 

Register on TC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Reload counter on each

 

 

 

 

 

 

Y

Y

Y

Y

Y

Y

TC, alternating reload

 

 

 

 

 

 

 

 

 

 

 

 

source between Load and

 

 

 

 

 

 

 

 

 

 

 

 

Hold Registers

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(N: No gate control, L: Level gate control, E: Edge gate control)

3

Chapter1

Image 11
Contents PCM-3780 Ch Counter/Timer with Ch TTL DIO ModuleCopyright Acknowledgements Two Years Product Warranty CE Notification FCC Class a Technical Support and Assistance Packing List Page Contents Appendix Specifications Introduction Features Counter Modes PCM-3780 Counter ModePCM-3780 Counter Mode Applications Installation GuideInstallation Flow Chart Register-level Programming Software OverviewDevice Drivers on the companion CD-ROM Device DriversProgramming Tools Device Drivers Programming RoadmapProgramming with Device Drivers Function Library Troubleshooting Device Drivers ErrorWiring Boards AccessoriesWiring Cables Hardware Installation Unpacking Companion CD-ROM Driver InstallationDifferent Options for Driver Setup Installing the Module Hardware InstallationPage Pin Assignments & Jumper Settings Overview Signal ConnectionsInterrupt Level IRQ Setting JP1 Switch and Jumper SettingsBase Address Setting Base Address Setting SW1CN4 Counter Interface Connector Connectors Pin AssignmentCN3 I/O Port Connector Reference Direction Description Connector Signal DescriptionPeriod Measurement Using Advantech 32-bit DLL DriverUsing Direct I/O Frequency Measurement Frequency MeasurementSpecifications Digital Input/Output Programmable CounterGeneral Page Block Diagram Appendix B Block Diagram Register Structure & Format I/O Port Address Map Appendix C Register Structure & FormatTable C.1 Register Offset Address Table Register FormatCE CE CM6 to CM3 Count Control CM6 Counter 0/1 Mode RegisterCM2 Output Enable Control CM1 to CM0 Output ControlCM15 Gate Active Edge or Level CM7 Count Source EdgeCM13 to CM12 Gate Source Selection CM14 Gating Polarity SelectionCounter 0/1 Hold Register Counter 0/1 Load RegisterCE1 to CE0 Counter Command Enable Bit Counter 0/1 Command RegisterCounter Command Enable Register C2 to C0 Command CodeInterrupt Status Register Interrupt Control RegisterO Direction Control Bit Interrupt Clear RegisterDirection Control Register Port A/B/C Interrupt Status RegisterDV3 to DV0 Fout Divider Divide by 1 to 16 0000 = Divide by Fout RegisterFS2 to FS0 Fout Source FOE Fout Output EnableWaveform of Each Mode Counter Mode Descriptions Appendix D Waveform of Each ModeTable D.1 PCM-3780 Counter Mode Table D.2 PCM-3780 Counter Mode Software-Triggered Strobe with No Hardware Gating Mode a WaveformsSoftware-Triggered Strobe with Level Gating Mode B WaveformsHardware-Triggered Strobe Mode C WaveformsRate Generator with No Hardware Gating Mode D WaveformsRate Generator with Level Gating Mode E WaveformsNon-Retriggerable One-Shot Mode F WaveformsSoftware-Triggered Delayed Pulse One-Shot Mode G WaveformsMode H Waveforms Hardware-Triggered Delayed Pulse Strobe Mode I WaveformsVariable Duty Cycle Rate Generator with No Hardware Gating Mode J WaveformsVariable Duty Cycle Rate Generator with Level Gating Mode K WaveformsHardware-Triggered Delayed Pulse One-Shot Mode L WaveformsHardware-Triggered Strobe with Edge Disarm Mode O WaveformsNon-Retriggerbale One-Shot with Edge Disarm Mode R WaveformsHardware-Triggered Delayed Pulse Strobe with Edge Disarm Mode U WaveformsHardware-Triggered Delayed Pulse One-Shot with Edge Disarm Mode X Waveforms