Browsing this Thread:
1 Anonymous Users
|
詢問MODBUS的0x03讀取功能
|
|
高級會員
Joined
: 2010/8/15 0:05 最後登入時間
: 2022/9/26 16:18
Group:
註冊會員
Level : 9 HP : 0 / 212 MP : 36 / 8466 EXP : 50
|
各位大大好 小弟目前是使用33CK256MP206來做MODBUS 但有個疑惑 關於MODBUS 0x03讀取的功能 小弟目前的理解是 一個暫存器的資料是兩個Byte組成一個(Word) 然後0x03讀取時候是以暫存器的數量 所以Byte數一定是 2的倍數 但有沒有可能暫存器是超過2Byte的? 因為目前要寫User_Name 跟 User_Password 可是這兩個參數 他的Byte數都是不固定的 是依照使用者輸入的數值當作數量 像這種情況 還能使用MODBUS達成嗎? 謝謝
目前想到的辦法是 把User_Name 跟 User_Password 先設定好最大只能填多少文字進去 請使用者把所有的資料讀取出來 例如 User_Name 最多可以填30個文字(Byte) 30個文字(Byte) = 15個暫存器號碼 所以使用者一次就要讀取這15個暫存器 才會知道
發表於: 2020/12/21 11:20
|
|
You can view topic.
你 不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.