发布于 2003-09-10 08:43:05
0楼
首先,用TD200向导生成要显示的数据,其中嵌入一个变量,然后在程序里将CO传给该变量即可。例如向导生成的数据块如下
//DATA BLOCK COMMENTS
//
//Press F1 for help and example data block
//
//BEGIN TD200_BLOCK ----------------------------
VB0 'TD'
VB2 16#60 //Set Language to Chinese, set Update to as fast as possible
VB3 16#B0 //Set the display to 20 character mode; Up key V3.2; Down key V3.3;
VB4 1 //Set the number of messages
VB5 0 //Set the Function Keys notification bits to M0.0 - M0.7
VW6 34 //Set the starting address for messages to VW34
VW8 14 //Set the starting address for message enable bits to VW14
VW10 0 //Global Password (if enabled)
VW12 256 //Character Set = Simplified Chinese
//MESSAGE 1
//Message Enable Bit V14.7
VB34 '这是一个变化值'
VB48 16#00 //No Edit;No Acknowledgement;No Password;
VB49 16#10 //Signed Word; 0 Digits to the right of the decimal;
VW50 16#0000 //Embedded Data Value: Move data for display here.
VB52 ' '
//END TD200_BLOCK ------------------------------
在程序里加入以下命令:
MOVW C0 VW50