Convert each speed pulse train into a signed, midpoint-centered analog command: forward drives the output above midpoint, reverse drives it below midpoint, and zero frequency returns it to midpoint. The evidence confirms two pulse-measurement channels, but it does not confirm that the T100MD888+ provides two suitable analog outputs. Verify output count, electrical range, command units, and microcontroller input compatibility before wiring.
Map the Two Frequency Inputs
| Motion side | Pulse channel | Physical PLC input | Frequency read |
|---|---|---|---|
| Left | 1 | Input #3 | PULSEFREQUENCY(1) |
| Right | 2 | Input #4 | PULSEFREQUENCY(2) |
Enable each required pulse-measurement channel once with its corresponding PMON function. The pulse voltage must be compatible with the PLC input. During online monitoring, confirm that the input logic status toggles when its pulse stream is present.
Define the Directional Scaling
Let f be the measured frequency, M the analog midpoint, and S the usable output span from the midpoint to either endpoint. For the requested 0 to 300 Hz command range:
Forward, DI = 1: AO_command = M + S * (f / 300)
Reverse, DI = 0: AO_command = M - S * (f / 300)
This mapping makes both directions produce M at 0 Hz. At 300 Hz, forward reaches the selected upper endpoint and reverse reaches the selected lower endpoint. The evidence does not state the T100MD888+ analog-output range, midpoint value, or SETDAC numeric limits, so derive M and S only after confirming those specifications and the microcontroller input range.
Implement the Two Direction Branches
Use a defined I/O label for each direction input and test it with TESTIO. The following TBASIC-style structure shows the supported decision path; replace the symbolic midpoint and span with values derived from the verified output range:
LeftFrequency = PULSEFREQUENCY(1)
IF TESTIO(LeftDirection) THEN
LeftCommand = Midpoint + Span * LeftFrequency / 300
ELSE
LeftCommand = Midpoint - Span * LeftFrequency / 300
ENDIF
RightFrequency = PULSEFREQUENCY(2)
IF TESTIO(RightDirection) THEN
RightCommand = Midpoint + Span * RightFrequency / 300
ELSE
RightCommand = Midpoint - Span * RightFrequency / 300
ENDIF
The available example uses SETDAC 1,F to send a frequency value directly to analog-output channel 1. Do not assume a second SETDAC channel or its electrical capability from that example; confirm that the installed PLC has two usable analog outputs and identify their valid channel numbers before adding the two output statements.
Configure the Update Procedure
- Connect the left and right pulse streams to inputs #3 and #4 respectively, after verifying voltage compatibility.
- Execute
PMON 1and the corresponding enable operation for pulse channel 2 once. - Read
PULSEFREQUENCY(1)andPULSEFREQUENCY(2)every scan or periodically from a clock pulse. - Read the two direction inputs with
TESTIO, apply the midpoint equations, and constrain each result to the verified DAC command range. - Write each command to its confirmed analog-output channel.
The stated pulse-measurement range is 1 Hz to 10000 Hz, while this application requires 0 to 300 Hz. The evidence does not define the returned value when pulses stop, so test the zero-frequency behavior. If the measured value does not reliably become zero, add a stopped-pulse decision using behavior documented for the installed PLC rather than assuming a timeout.
Verify Signal and Direction Behavior
| Test condition | Expected command | Verification |
|---|---|---|
| 0 Hz, either direction state | Midpoint | Confirm both output commands and measured analog voltages return to midpoint. |
| Frequency increases, DI = 1 | Rises from midpoint | Confirm monotonic increase through 300 Hz without exceeding the verified output limit. |
| Frequency increases, DI = 0 | Falls from midpoint | Confirm monotonic decrease through 300 Hz without crossing the verified lower limit. |
| Independent left/right inputs | Independent outputs | Change one frequency and direction pair while holding the other pair fixed. |
Also compare the PLC frequency values with the applied pulse frequencies and measure each analog signal at both the PLC output and microcontroller input. An RS485 digital interface can avoid analog conversion error, but it requires a protocol implemented by both devices; the analog approach remains valid only after output count and electrical compatibility are confirmed.
FAQ
Which T100MD inputs measure pulse frequency?
Pulse-measurement channel 1 maps to physical input #3, and channel 2 maps to physical input #4. Enable the channels with their corresponding PMON operations and verify that each monitored input toggles with the pulse stream.
How do I encode forward and reverse on one analog output?
Use the analog midpoint as zero speed. For DI = 1, calculate M + S × f/300; for DI = 0, calculate M - S × f/300.
Can the T100MD888+ produce two analog speed commands?
The evidence confirms two frequency inputs but does not confirm two suitable analog outputs on this model. Check the installed unit's output count, range, channel mapping, and load compatibility before implementing the left and right SETDAC writes.