恭喜,你发布的帖子
发布于 2019-06-17 14:34:11
6楼
谢谢,你说的我已理解,下载的DB块会刷掉了原有的值,我有几点疑问,还请赐教。1.从PLC上载的DB block中的内容,只有之前在程序中定义、赋值过的,才能再次上载到电脑中,不知道这样理解对不对。因为HMI中参数设定地址用的是V区域,在PLC DB BLOCK中没有定义过;2.如果我假设的第一条是对的,那么在HMI中数据,用PLC程序是无法保存的,用怎么样的方法,能将数据保存到程序中。谢谢!
季总,谢谢解答!我查了HELP,SMB31 writer control byte和SMW32 address of v area
You can save a value stored in V memory to permanent memory (EEPROM) under the control of your program. To do this, load the address of the location to be saved in SMW32. Then, load SMB31 with the command to save the value. Once you have loaded the command to save the value, you do not change the value in V memory until the CPU resets SM31.7, indicating that the save operation is complete.
At the end of each scan, the CPU checks to see if a command to save a value to permanent memory was issued. If a command was issued, the specified value is saved to permanent memory.
Save_to_EEPROM SMB31 Setup save parameters for saving a value stored in V memory to permanent memory (EEPROM)
Save_to_EEPROM_7 SM31.7 User Request to execute permanent memory save operation (0=no request, 1=save)
The CPU resets this bit after every save operation
Save_Address SMW32 Stores the address of the V memory location to be saved
我的理解是:将SM31.7设定1,SMW32存储的V地址中的数据导入到EEPROM中,而且该地址的值不能改变,直到SM31.7reset
如果是HMI上使用的V区域变量(例如VW1000),如何将这些变量保存的EEPROM,当我再次上载的时候VW1000是否在DB BLOCK中,谢谢!
请填写推广理由:
分享
只看
楼主