Welcome to the Industrial Automation website!

NameDescriptionContent
XING-Automation
E-mail  
Password  
  
Forgot password?
  Register
当前位置:

SAIA Burgess PCD2.H110 Counting and Measurement Module

F: | Au:FAN | DA:2026-04-07 | 918 Br: | 🔊 点击朗读正文 ❚❚ ▶ | Share:

k 1       ; Module Number 1

0 Counting mode x1

r 999     ; Starting value of counter

r 998     ; Register preset value

1         ; Enable C static inversion

1         ; CCO static inversion

0 Input A is normal (counting)

0 Input B is normal

5         ; Measurement mode: Automatic frequency

100       ; Measurement window of 100 ms

0 Enable M static positive logic

2         ; TCO dynamic positive pulse

All parameters must be within the allowed range, otherwise the error flag fPar_Srr is set and the diagnostic register rDiag records the error code.

5.3 Execute Function Block EXEC

EXEC is used to send commands such as starting counters, reading count values, loading preset values, starting/stopping measurements, etc. Three parameters: module number, command code, and destination/source registers. The supported commands include:

LdCtPress: Load counter preset value

LdReppres: Load comparison register value

ModMsConf: Change measurement configuration (runtime)

LdMsVal: Set measurement window/time base

RdCt: Read the current count value (24 bits)

RdMsImp: Read and measure the original pulse count (16 bits)

RdMsUnit: Read the converted value (floating point number, Hz or s)

StartCt / StartMs / StopMs

RdIdent: Read module identifier (verify if the module is working properly, return value 17xx)

5.4 GRAFTEC Programming Example

The manual provides three complete GRAFTEC application routines, demonstrating the programming structure in practical engineering.

Example 1: Simple counter (frequency divider)

Task: Counter preset value 500, compare register 900, Enable C static inversion, CCO static positive logic. When the counter reaches 900, the CCO outputs a high level. The user program detects this and flips a digital output, reloading the counter to 500 to continue counting. The program calls INIT in the initialization step (IST), polls the CCO status in the subsequent steps, and executes overloading.

Example 2: Motion Control with Incremental Encoder

Task: The workbench is driven by a DC motor and equipped with a 500 pulse/rev incremental encoder (screw pitch 1 mm). It needs to move from the starting point A to B, pause and then return to A. During operation, it accelerates quickly and switches to slow speed when approaching the target, ultimately achieving precise positioning. This example uses x2 counting mode to directly control the fast/slow and direction of the motor through CCO output, and software polls the CCO status to achieve GRAFTEC step switching. The program also handles negative position display (by subtracting an offset to avoid negative display). This application demonstrates the capability of the H110 module as an axis positioning controller.

Example 3: Measuring object size with a photoelectric grid

Task: When an object on the conveyor belt obstructs the photoelectric grid, count the pulses proportional to the speed of the conveyor belt to measure the length of the object for sorting. Connect the photoelectric grid signal to the Enable C input (static inversion), connect the counting pulse to the A input, and connect the B input to a fixed high level (or GND after inversion). When the photoelectric grid is obstructed, the Enable C is activated and the counter starts counting; When the obstruction ends, the counter stops and the read count value is the length of the object. The program polls the CStart status in GRAFTEC and stores the results in a continuous register queue after each measurement. This scheme has been used for sorting melons and apricots in the south of France.


Error handling and diagnosis

The module will detect parameter errors during runtime. If a parameter in Initiat exceeds the range, the module will automatically set it to the minimum value and set the global error flag fPar-Err. At the same time, the diagnostic register rDiag will be encoded in bytes: FB number (1=Initiat, 2=EXEC), parameter number, and module number. For example, 00 01 06 02 indicates that parameter 6 (CCO configuration) of module 2 is incorrect. Users can clear this flag in XOB 16 or initialization step. In addition, EXEC command code errors will report "Symbol not defined" during assembly. Hardware failure can be verified by reading the identification code through RdIdent. The normal value should be 17xx (specific versions such as 2759, 1761, etc.). If it reads back 0, it indicates module failure or address error.


Parallel use of counting and measurement

The manual clearly points out that counting and frequency measurement can run in parallel on the same module. For example, in motion control examples, the frequency of the encoder signal can be measured while positioning to obtain real-time speed. Just configure the counting parameters and measuring parameters (parameter 9=5, parameter 10=window time) in INIT at the same time, call StartMs to start the measurement after initialization, and then read the measurement results in the main loop. Due to having only one display module, usually only one quantity is displayed, but PCD registers can store two values simultaneously.

  • National Instruments cRIO-9112 Chassis
  • National Instruments PXIe-1078 Chassis
  • National Instruments PCIe-6536 DIO Board
  • National Instruments NI-9425 Input Module
  • National Instruments PCI-5122 Digitizer Card
  • National Instruments 779072-01 Relay Module
  • National Instruments 783703-01 DAQ Module
  • National Instruments PXI-6515 Digital Module
  • National Instruments 781099-01 DAQ Device
  • National Instruments PXI-8183 PXI Controller
  • National Instruments sbRIO-9626 Single-Board RIO Controller
  • National Instruments PXIe-1435 Camera Link Frame Grabber
  • National Instruments NI 9237 Strain Bridge Input Module
  • National Instruments PXIe-4353 Thermocouple Input Module
  • National Instruments PCIe-6320 X Series DAQ Card
  • National Instruments NI 1454 Compact Vision System
  • National Instruments PCIe-6321 X Series DAQ Card
  • National Instruments PXIe-5172 PXI Oscilloscope Module
  • National Instruments cDAQ-9134 CompactDAQ Controller
  • National Instruments cRIO-9063 CompactRIO Controller
  • National Instruments PXI-4070 DMM Card
  • National Instruments cFP-BP-4 Backplane
  • National Instruments 779521-01 Bridge Module
  • National Instruments cDAQ-9172 Chassis
  • National Instruments NI 9236 Strain Module
  • National Instruments PXI-1042Q Chassis
  • National Instruments SCXI-1102 Input Module
  • National Instruments 776990-01 Input Module
  • National Instruments PXI-1045 PXI Chassis
  • National Instruments PCIe-6251 DAQ Device
  • National Instruments NI 9219 Universal Analog Input Module
  • National Instruments NI 9215 BNC Analog Input Module
  • National Instruments PXIe-6570 Digital Pattern Instrument
  • National Instruments NI-9477 Digital Output Module
  • National Instruments NI 9145 EtherCAT Chassis
  • National Instruments PCI-6521 Industrial Digital I/O Card
  • National Instruments NI 9239 BNC Voltage Input Module
  • National Instruments NI 9265 Current Output Module
  • National Instruments NI 9212 Thermocouple Input Module
  • National Instruments PXI-6229 Multifunction DAQ Module
  • National Instruments NI-9146 Chassis
  • National Instruments PXIe-5622 Digitizer
  • National Instruments PXI-6704 Output Module
  • National Instruments 782362-01 Input Module
  • National Instruments 779068-01 Digital Module
  • National Instruments 781063-01 Output Module
  • National Instruments PCI-7356 Motion Controller
  • National Instruments 779787-01 Input Module
  • National Instruments PXIe-1071 System
  • National Instruments NI 9219 Input Module
  • National Instruments NI 9214 Thermocouple Input Module
  • National Instruments PXIe-1085 18-Slot Chassis
  • National Instruments PCIe-6320 Multifunction DAQ Card
  • National Instruments USB-6211 Multifunction I/O Device
  • National Instruments USB-6341 X Series DAQ Device
  • National Instruments NI 9205 Analog Input Module
  • National Instruments NI 9149 8-Slot Chassis
  • National Instruments PXIe-2569 Relay Module
  • National Instruments NI 9230 Sound and Vibration Module
  • National Instruments cRIO-9047 CompactRIO Controller
  • National Instruments PCI-6534 Digital IO Card
  • National Instruments PXI-5122 Digitizer Module
  • National Instruments cDAQ-9188XT Chassis
  • National Instruments cDAQ-9184 Ethernet Chassis
  • National Instruments USB-6225 OEM DAQ Device
  • National Instruments NI 9205 Input Module
  • National Instruments NI 9207 Input Module
  • National Instruments NI-9862 CAN Module
  • National Instruments 781156-01 CAN Module
  • National Instruments FP-AO-200 Output Module
  • National Instruments NI 9264 Output Module
  • National Instruments IC-3173 Controller
  • National Instruments NI 9234 Vibration Module
  • National Instruments SMB-2163 DIO Accessory
  • National Instruments PXIe-1062Q DSA System
  • National Instruments USB-6289 DAQ Device
  • National Instruments NI 9233 Vibration Module
  • National Instruments PXIe-5840 VST
  • National Instruments PXI-1033 and PXI-6132 System
  • National Instruments GPIB-USB-HS+ Controller
  • National Instruments NI 9231 Sound and Vibration Module
  • National Instruments cRIO-9074 CompactRIO Controller
  • National Instruments 782536-01 DAQ Module
  • National Instruments 779781-01 DAQ Module
  • National Instruments PXIe-8388 MXI Express Controller
  • National Instruments SCXI-1520 Strain Bridge Module
  • National Instruments PCIe-6320 Multifunction DAQ Card
  • National Instruments NI 9234 Sound and Vibration Module
  • National Instruments USB-4431 Sound and Vibration Device
  • National Instruments NI 9227 Current Input Module
  • National Instruments PXI-1033 PXI Chassis
  • National Instruments NI 9213 Thermocouple Module
  • National Instruments PXI-1042 PXI Chassis
  • National Instruments PXI-6229 DAQ Card
  • National Instruments cRIO-9075 Controller
  • National Instruments PCI-6033E DAQ Card
  • National Instruments PCIe-6363 DAQ Card
  • National Instruments cDAQ-9174 Chassis
  • National Instruments PXIe-8880 PXI Controller
  • National Instruments NI 9242 Analog Input Module
  • National Instruments USB-6221 BNC DAQ Device
  • National Instruments NI 9220 Analog Input Module
  • National Instruments cRIO-9068 CompactRIO Controller
  • National Instruments PXI-4130 Source Measure Unit
  • National Instruments USB-6251 Multifunction DAQ Device
  • National Instruments PXI-8106 Embedded Controller
  • National Instruments USB-6218 Multifunction DAQ Device
  • National Instruments PCIe-1473R Camera Link Frame Grabber
  • National Instruments PXIe-4341 DSA Module
  • National Instruments PXI-8102 Embedded Controller
  • National Instruments cDAQ-9178 Chassis
  • National Instruments USB-6210 DAQ Device
  • National Instruments USB-6212 DAQ Device
  • National Instruments NI 9485 Relay Output Module
  • National Instruments NI 9208 Current Input Module
  • National Instruments PXIe-4141 SMU
  • National Instruments PCI-6154 DAQ Card
  • National Instruments cRIO-9038 Controller
  • National Instruments PCI-6133 DAQ Card
  • National Instruments LabVIEW RIO Kit 501684G
  • National Instruments PXIe-6396 Embedded Controller
  • National Instruments USB-8502 CAN Interface Device
  • National Instruments NI 9264 Spring Terminal Output Module
  • National Instruments NI 9213 Thermocouple Input Module
  • National Instruments NI-9205 Analog Input Module
  • National Instruments NI 9264 Analog Output Module
  • National Instruments USB-6212 Multifunction I/O Module
  • National Instruments PXI-4071 FlexDMM Multimeter Module