我們的品牌

Impact-Company-Logo-English Black-01-177x54

歡迎造訪施耐德電機全球網站

歡迎訪問我們的網站
		
我们今天能为您提供什么帮助?
Why don't I see the error code on my READ_REG block?

Goals and Symptoms

This resolution is designed to outline the reasons why a user may not see the error code from a communication block as well as the logic to 'capture' it.

Facts and Changes


Facts and Changes

  • The code below applies to both Concept and Unity Pro.
  • The principle of the code below will also apply to READ_REG, WRITE_REG, READREG, WRITEREG, CREADREG, and CWRITEREG blocks but may require some modification depending on the communication block being use.

Causes and Fixes

Causes and Fixes

Communication block such as the READ_REG take several scans to solve. The error code the block generates is put into the status register for one scan and then replaced by a 0.
For this reason when the block fails to communicate to the slave device the error code is often not seen.

Logic to capture the error code must be added.

The READ_REG's STATUS output is configured as a located 4X WORD 400001. The code below is actually running in a controller communicating to a device that does not exist, so the block is currently in an error condition. The status register displays a 0 for say 9 out of 10 scans. Only during one of those say 10 scans, will register 400001 display an error code.
The code below is designed to 'capture' the error code. When the error output on the block goes high during that scan the error code will be moved to the STATUS output. The R_TRIG (rising edge trigger) will move the value in the status register into a table of register provided by the R2T (register to table)

Note: It is important to note the solve order of the blocks; the R_TRIG and R2T cannot be solved before the READ_REG.

example

施耐德電機Taiwan

探索更多
系列:
探索更多
系列:

需要協助?

  • 產品選型工具

    快速輕鬆地為您的應用找到合適的產品和附件。

  • 取得報價

    立即線上提交您的銷售需求,專業團隊將主動聯繫您。

  • 購買地點

    輕鬆在您所在地區找到最近的施耐德電機經銷商。

  • 支援中心

    在同一位置找到滿足您所有需求的支援資源。

  • 產品文檔
  • 軟體下載
  • 產品選型工具
  • 產品替代和替換
  • 幫助和聯絡中心
  • 尋找我們的辦公室
  • 取得報價
  • 人才招募
  • 公司簡介
  • 舉報不當行為
  • 無障礙
  • 新聞中心
  • 投資者
  • 專業洞察
  • 台灣施耐德電機學院
  • 綠色影響力落差調查
  • Schneider Go Green 2025
  • 隱私政策
  • Cookie通告
  • 使用條款
  • Change your cookie settings