9 PLC Handout Conflicts Checked Against Official Manuals
Training handouts are easy to read and written in Thai, but their figures have been copied through several versions. When two pages in the same set give different node address ranges, the only way to know which is right is to open the official manual for the exact model and record the page number.
1-minute summary
- Symptom / problem
- A Thai PLC network training handout contradicts itself in 9 places
- Who should read
- Anyone about to use numbers from a training handout to configure or design a PLC network
- Fix in short
- Check each against the matching official manual and note the page number. Here the handout was wrong in 7 places, and 2 were correct in both depending on conditions.
I happened to get an entire folder of Thai PLC training materials, which I intended to use as the basis for research on PLC networks with references for every point. I asked AI to read the whole set and produce a summary. On its first pass, it read only the 15 PDF files and reported two things I had not expected. First, the documents contained 9 conflicting figures, such as one page giving one node address range and another giving a different range. Second, there were another 14 .doc and .ppt files it had not read. If I had used that first report as it stood, I would have had research with complete references but incorrect figures. I told it to find official manuals to resolve every discrepancy and read all the remaining files. This article covers the method I used and the results.
I will not name who created these handouts or where they came from, because that is not the point. Almost every set of training materials has similar problems. The point is how to check them.
This was entirely a document review. I did not test a single piece of actual Omron hardware. Values marked as checked were checked against official manuals and have page references; they were not tested by configuring equipment. Also, many tables in the handouts are images. Pages whose images I did not open may contain figures I did not capture. There may be more than 9 conflicts.
Extract PDF text first, then open images only where needed
The materials consisted of a basic set of 6 chapters totaling about 120 pages, plus another 9 networking files. The first step was to extract the text with PyMuPDF and check that it was actually readable, rather than garbled by embedded fonts. If it was readable, I could work directly with the text without spending time opening an image of every page.
The problem was the table pages. Many tables in this set were embedded as images, so the extracted text contained only the surrounding descriptions, with none of the figures in the tables. I had a script print the character count and image count for each page first, then rendered only pages containing important tables as images. I viewed images of 6 pages for this task.
import sys, pathlib
import fitz # PyMuPDF
src = pathlib.Path(sys.argv[1])
render = {int(n) for n in sys.argv[2:]} # เลขหน้าที่ต้องการเปิดเป็นภาพ
out = pathlib.Path('text')
out.mkdir(exist_ok=True)
doc = fitz.open(src)
for no, page in enumerate(doc, start=1):
text = page.get_text()
(out / f'{src.stem}_p{no:03d}.txt').write_text(text, encoding='utf-8')
print(f'p{no:03d} chars={len(text.strip()):5d} images={len(page.get_images())}')
if no in render:
page.get_pixmap(dpi=150).save(str(out / f'{src.stem}_p{no:03d}.png'))
All page references in this work use PDF file page numbers, not the page numbers printed in the corners, because anyone can jump straight to a file page number without guessing whether the cover and contents count.
Old .doc and .ppt files need Word to open them
The remaining 14 files were .doc, .ppt, and .pptx files. The python-docx library only reads .docx; it cannot open old .doc files. The most direct approach on Windows was to have the actual Word and PowerPoint applications open the files through COM, then extract their text.
New-Item -ItemType Directory -Force .\text | Out-Null
$word = New-Object -ComObject Word.Application
$word.Visible = $false
Get-ChildItem .\handout -Filter *.doc | ForEach-Object {
$doc = $word.Documents.Open($_.FullName, $false, $true) # ไม่ถามแปลงไฟล์, เปิดแบบอ่านอย่างเดียว
$doc.Content.Text | Set-Content -Encoding utf8 ".\text\$($_.BaseName).txt"
$doc.Close($false)
}
$word.Quit()
$ppt = New-Object -ComObject PowerPoint.Application
Get-ChildItem .\handout -Include *.ppt, *.pptx -Recurse | ForEach-Object {
$pres = $ppt.Presentations.Open($_.FullName, -1, 0, 0) # ReadOnly = msoTrue, Untitled = msoFalse, WithWindow = msoFalse
$lines = foreach ($slide in $pres.Slides) {
foreach ($shape in $slide.Shapes) {
if ($shape.HasTextFrame -and $shape.TextFrame.HasText) {
"[slide $($slide.SlideIndex)] " + $shape.TextFrame.TextRange.Text
}
}
}
$lines | Set-Content -Encoding utf8 ".\text\$($_.BaseName).txt"
$pres.Close()
}
$ppt.Quit()
The drawback of .doc files is that their page numbers are not stable. Pagination depends on the printer and fonts on the machine opening them. I therefore referenced content in these files by section number instead of page number. For slides, I used slide numbers.
Once I had read everything, the .doc version of the basic set turned out to have the same content as the PDF version. But the networking set had one chapter available only as a .doc file, so stopping after the first pass would have missed an entire chapter. That is why I do not accept a claim that everything has been read until I see the list of files actually opened compared with the files in the folder.
Download the official manuals, then search with regex and page numbers
I used 4 official manuals for the checks, downloaded from Omron's documentation website: W420-E1-06 (Ethernet Units, 289 pages), W309-E1-12 (Controller Link Units, 400 pages), W380-E1-10 (CS/CJ DeviceNet Units, 294 pages), and W352-E1-07 (CPM2A).
There were two snags here. First, the AI's web retrieval tool could not read PDF URLs and returned unreadable binary data, so I had to download the files locally with curl first. Second, some forums returned 403, which I did not try to bypass, since forums were not primary sources anyway.
# โหลดไฟล์ลงเครื่องก่อน อย่าให้ตัวดึงหน้าเว็บอ่าน PDF ตรง ๆ
curl -L --fail -o w420.pdf "$MANUAL_URL"
file w420.pdf # ต้องขึ้นว่า PDF document ไม่ใช่ HTML ของหน้า error
Once I had the files, I searched them page by page with regex, returning the page number and matching line, then opened each page to read the full context. Do not judge a claim from the single line matched by a regex.
import re, sys
import fitz
pattern = re.compile(sys.argv[2], re.I)
doc = fitz.open(sys.argv[1])
for no, page in enumerate(doc, start=1):
for line in page.get_text().splitlines():
if pattern.search(line):
print(f'p{no}: {line.strip()}')
python find.py w420.pdf "node address"
python find.py w309.pdf "data link status"
One side incident is worth recording. For the second reading pass, I split the work among 3 subagents. It turned out that 2 failed because of API overload, and when I told them to continue, they failed again. The waiting time was wasted. The rule I took from this was that if two retries still fail, the main agent should read the material itself instead of waiting.
Verdicts on the 9 conflicts
I recorded each conflict as a single entry containing the values from both conflicting handout pages, the value from the official manual, the manual ID and page number, and a verdict from 5 predefined categories: typo, copied from another chapter, conditionally valid, different model, and not found in the manual.
{
"id": 1,
"topic": "Ethernet unit node address",
"handout": ["01-32", "1-254"],
"official": "01 to FE hexadecimal (1 to 254 decimal)",
"source": {"manual": "W420-E1-06", "pdf_page": 56},
"verdict": "คัดลอกข้ามบท",
"note": "ค่า 01-32 เป็นช่วงของ Controller Link"
}
A brief look at each case: in case 1, one page gave the Ethernet unit's node address range as 01-32, while another gave 1-254. W420 page 56 specifies 01 to FE in hexadecimal, or 1 to 254. The 01-32 range belongs to Controller Link and had carried over from another chapter. In case 2, the DeviceNet node address range was given as 01-32, but examples in the same document used 00 to 63. W380 page 73 specifies 0 to 63. In case 4, one chapter said a lit M/A indicator meant Manual, while another said it meant Auto. W309 page 70 specifies that lit means Manual and unlit means Automatic. In case 5, the Data Link Status location was given as both +17 to +22 and +7 to +22. The manual specifies +7 to +22 on page 186. In case 7, the DeviceNet fixed allocation table was shifted by one position, pairing address 1 with node 02. W380 page 54 specifies that word n corresponds to node n. In case 9, the LR area's full name was given in parentheses as Temporary Relay. W352 specifies Link Relay.
Case 8 was interesting because the conflict was on the same page. The circuit diagram gave the input impedance as 4.7 kΩ, but the table said 47 kΩ. W352 pages 53 to 54 give three values: 2.7 kΩ for the first two inputs, then 3.9 kΩ, and 4.7 kΩ for the rest. The value 47 therefore had a missing decimal point. As for the current value the handout cited for inputs being ON simultaneously, I could not find it in the manual for that model, so I marked it as not found rather than wrong.
The two cases that were not wrong were 6 and 3. In case 6, the Data Link node count was given as 32 in one chapter and 32 or 62 in another. Both were correct, because 62 nodes are supported only when three conditions are met: -V1 units are used, a Repeater is present, and bit 11 of the settings word is set on every node (W309 page 33). In case 3, one chapter said 64 Slaves and another said 63 nodes. W380 page 26 specifies a maximum of 63 Slaves per Master, while 64 is the total network node count including the Master. Both numbers are therefore valid if they count different things. The mistake was the word Slave attached to 64.
There was another group of figures that differed from the manuals but were not typos: the handouts were written for older equipment. The data link capacity of 1,000 words per node and 12,000 words in total applies to -V1 models, while newer models support 4,000 and 20,000. The handouts also gave relay contact life as 300,000 operations, while the manual for the model I opened specified 150,000 operations with a 24 VDC resistive load. I classified these as different model. Without that category, I could have judged the handouts wrong even though they were correct for their models.
This work is similar to what I previously wrote about using code to check figures extracted by AI. The difference is that code was the checker then; this time, it was primary documents and page references.
Results: Omron network limits checked against the manuals
The result of the review was a table of limits for three network types that can be used for selection and configuration. I have collected them here. Every value has a manual page reference.
Ethernet unit (CS1W-ETN21 / CJ1W-ETN21) supports node addresses from 1 to 254 (W420 page 56), and the final octet of the IP address must match the node number. If it does not, the ERH indicator lights up. This accounts for some cases where the error indicator lights up after configuring the unit according to the handouts. The Unit number can be set from 0 to F. There are three ways to configure the unit: CX-Programmer, CX-Integrator, and a web browser. The email function can attach up to 6,000 word of I/O memory, with scheduled sending intervals from 10 minutes to 10 days, and the FTP server accepts 1 client at a time.
Controller Link is an N:N token bus. Its speed and distance combinations are 2 Mbps at 500 meters, 1 Mbps at 800 meters, and 500 kbps at 1 kilometer. It normally supports 32 nodes. If 62 nodes are not enabled, use only node addresses 1 to 32 (W309 page 27). A lit M/A indicator means Manual, an unlit indicator means Automatic, and it is always unlit when the data link is inactive (page 70). The default Data Link Status occupies 16 words (page 186), and when using 62 nodes with the 8-bit status format, the default displays only nodes 1 to 32 (page 182). The -V1 models can send 1,000 words per node, totaling 12,000, while CLK23 and CS/CJ Unit Ver. 1.2 and later support 4,000 and 20,000 (pages 6 and 31).
DeviceNet (CS1W-DRM21 / CJ1W-DRM21) runs at 125, 250, or 500 kbps. Node addresses range from 0 to 63 and are set as two decimal digits (W380 page 73). The maximum is 63 Slaves per Master (page 26). Fixed allocation uses CIO 3200 to 3263 for OUT and CIO 3300 to 3363 for IN, with 1 word per node in node number order (page 54). Fixed allocation supports 3 Masters, with the second set using 3400 and 3500 and the third using 3600 and 3700, while user-set allocation supports 16.
The 4-position DIP switch on the front of the DeviceNet unit is what I consider the most important detail in the entire set, because the last two switches determine what happens to the outputs when communication fails (W380 page 74).
| Switch | Used when acting as | OFF | ON |
|---|---|---|---|
| 1-2 | Both | Select baud rate 125 / 250 / 500 kbps | |
| 3 | Master | Continue communication when an error occurs | Stop communication |
| 4 | Slave | Clear remote output | Hold remote output value |
All three units share the same memory allocation formulas. The settings area is D30000 + 100 x Unit No. The status area is CIO 1500 + 25 x Unit No.
def unit_areas(unit_no):
dm = 30000 + 100 * unit_no # พื้นที่ค่าตั้ง
cio = 1500 + 25 * unit_no # พื้นที่สถานะ
return dm, cio
for unit in (0, 2, 15):
dm, cio = unit_areas(unit)
print(f'Unit {unit:2d}: D{dm} / CIO {cio} Data Link Status CIO {cio + 7}-{cio + 22}')
# Unit 0: D30000 / CIO 1500 Data Link Status CIO 1507-1522
# Unit 2: D30200 / CIO 1550 Data Link Status CIO 1557-1572
# Unit 15: D31500 / CIO 1875 Data Link Status CIO 1882-1897
DeviceNet also has a Scan List, which registers Slaves with the Master. It is enabled with bit 00 and disabled or cleared with bit 01 of the first word in the status area. It must be disabled before adding or moving a Slave or changing its node address, and software switches must be set one at a time. Setting more than one at once produces error C6. For the NS indicator, steady red means a duplicate node address or Bus Off, while flashing red means a communications error.
All values come from the specified manual revisions, and I did not test them on actual hardware. Different models or unit versions can have different limits, as the data link capacity example shows. Setting outputs to hold or clear, setting continue or stop, and changing the Scan List directly affect what a machine does when communication fails. For actual work, open the manual for the installed model and have the control systems engineer responsible for that machine make the decisions and test them on site.
Lessons to apply to other document sets
- Compare the list of files actually opened with the files in the folder before accepting a claim that everything has been read. Files the tools cannot open are often silently skipped.
- Extract the text first, check that it is readable, then open images only for pages containing tables or figures.
- Reference every point with a document ID and file page number. For files without stable page numbers, use section numbers.
- Separate your own analysis from statements taken from the documents. I prefix my analysis with the word Analysis every time.
- Define verdict categories before starting the checks, and include different model and not found. Otherwise, everything gets forced into right or wrong.
- For work assigned to subagents, read it yourself if two retries fail.
I am not concluding that training handouts are unusable. They explain the overall picture in Thai better than a 400-page manual, and the 9 conflicts I found are a small part of the whole set. The distinction to make is between two uses. Handouts are fine for reading to understand, but figures used for configuration or design must come from the official manual for the exact model, with page references.
Conflicts in a document are not a disaster; they are a signal showing where to open a primary source. What is more dangerous is an incorrect figure that does not conflict with any other page, which this method cannot catch. I still have no way to catch those beyond comparing each table against the manual. Many pages containing images remain unopened. If I review more and find new conflicts, or someone checks actual hardware and gets different values, I will come back and update this article.
Hit something like this? Stuck somewhere?
Come trade notes on the LinuxThai board



Comments 0
No comments yet — be the first