迪文科技论坛

 找回密码
 立即注册
搜索
查看: 246|回复: 5

[Question]How to change my page by the serial command ?

[复制链接]

9

主题

65

回帖

264

积分

中级会员

Rank: 3Rank: 3

积分
264
发表于 2023-7-21 10:01:56 | 显示全部楼层 |阅读模式
Hi, I'm trying to change my page to another one by the serial command,
and tried a few ways to change my page

Before asking about my trouble, as far as I know, I think 'page' is the number of 'location' value on DGUS2,
is it correct ? I need to change my location 0 to another like 1, 2, 3....

First trial was announced at the document, T5L_DGUSII-Application-Development-Guide-V2.5.pdf.

    5.1 System Variable Interface
    System variable address range: 0x0000-0x0FFF.

        0x84 PIC_Set R/W 2
        D3: 0x5A = enable page operation once, The CPU is clearedafter
        processing. D2: Processing Mode. 0x01=page switch (Display the image specified in the image storageareatothe current background page). 0x02=This mode is reserved and not supported.
        Instruction example:
        5A A5 07 82 0084 5A01 0001, display the 01 serial number pictureunderthe background picture ICL file (if the serial number pictureIDof thesentinstruction does not exist, the instruction operation judgment will not takeeffect.)

I tried to send : 5A A5 07 82 0084 5A01 0001
And nothing changed in my screen. It's still on the 0 page. '0002' and '0003' also are no way..

So, I tried to find another way and found a library.

https://github.com/dwinhmi/DWIN_DGUS_HMI/blob/master/src/DWIN.cpp

// Change Page
  1. void DWIN::setPage(byte page){
  2.     //5A A5 07 82 00 84 5a 01 00 02
  3.     byte sendBuffer[] = {CMD_HEAD1, CMD_HEAD2, 0x07, CMD_WRITE, 0x00, 0x84, 0x5A, 0x01, 0x00, page};
  4.     _dwinSerial->write(sendBuffer, sizeof(sendBuffer));
  5.     readDWIN();
  6. }
复制代码
It's same one with the document. So I guess above my first trial should be work as expected even it's failed..


But, I found another method on Youtube.

DWIN K600+ Tutorial: Directly change page or via command---from DWIN Technology
https://youtu.be/zGT8GTcvjLs?t=70

    5a a5 04 80 03 0001

I tried to send "5a a5 04 80 03 0001" but nothing changed in this time too.


Could you let me know how to change my page to another ?

回复

使用道具 举报

0

主题

471

回帖

1万

积分

论坛元老

Rank: 8Rank: 8

积分
13594
发表于 2023-7-21 10:31:42 | 显示全部楼层
Dear, what is your complete screen model?
5A A5 07 82 0084 5A01 0001 this command for page switching is suitable for T5L
5a a5 04 80 03 0001 this command for page switching is suitable for K600+
回复

使用道具 举报

9

主题

65

回帖

264

积分

中级会员

Rank: 3Rank: 3

积分
264
 楼主| 发表于 2023-7-21 12:10:53 | 显示全部楼层
Serena 发表于 2023-7-21 10:31
Dear, what is your complete screen model?
5A A5 07 82 0084 5A01 0001 this command for page switchin ...

Ah, K600+ has different type of commands. I see !
I have "DMG10600F101_01WTC"
and I thought "5A A5 07 82 0084 5A01 0001" should be work but it wouldn't.
So I'm tryin to find why and new way to do...
回复

使用道具 举报

9

主题

65

回帖

264

积分

中级会员

Rank: 3Rank: 3

积分
264
 楼主| 发表于 2023-7-21 12:36:43 | 显示全部楼层
本帖最后由 jhpark 于 2023-7-21 13:34 编辑

I found my problem it's mistypo for CMD_WRITE !
I leaved it old and woildn't check

Thanks Serena ! Your confirmation is good for me to find my problem !



回复

使用道具 举报

0

主题

932

回帖

6966

积分

论坛元老

Rank: 8Rank: 8

积分
6966
发表于 2023-7-21 13:41:13 | 显示全部楼层
jhpark 发表于 2023-7-21 12:36
I found my problem it's mistypo for CMD_WRITE !
I leaved it old and woildn't check

You can check whether the communication of the screen is normal, send 5AA5 04 83 000F 01 to see if there is a return, if there is a return, the communication is normal, and the page cutting instruction (5AA5 07 82 0084 5A01 0001) can cut the page normally.
回复

使用道具 举报

9

主题

65

回帖

264

积分

中级会员

Rank: 3Rank: 3

积分
264
 楼主| 发表于 2023-7-21 17:57:49 | 显示全部楼层
fay 发表于 2023-7-21 13:41
You can check whether the communication of the screen is normal, send 5AA5 04 83 000F 01 to see if ...

Thanks for your check point, fay!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|迪文科技论坛 ( 京ICP备05033781号-1 )

GMT+8, 2025-7-2 01:15 , Processed in 0.027470 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表