User Tools

Site Tools

한국어

comfilehmi:hmieditor_address:index

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
comfilehmi:hmieditor_address:index [2018/10/29 09:37]
COMFILE Technology [Data Types for Word Addresses]
comfilehmi:hmieditor_address:index [2019/01/09 13:37] (current)
COMFILE Technology [Data Types for Word Addresses]
Line 26: Line 26:
  
 <code xbasic> <code xbasic>
 +#include "​MSB6XX"​
 + 
 +Opencom 1,​115200,​3,​1024,​1024
 +Set Modbus 1,1,20
 +
 +Set Ladder On
 +
 Dim Value As Single Dim Value As Single
-Value = 0.0 +Value = 3.14 
-Dim Bytes As Integer+Dim Bytes As Long
 Bytes = 0 Bytes = 0
 + 
 Do Do
- Bytes = Peek(Memadr(Value),​ 4) +   Value = Value + 0.01 
- _D(0) = Bytes.Byte1 +   Debug Fp(Value, 3, 2), Cr 
- _D(0) = (_D(0) ​<< 8) Or Bytes.Byte0 +  
- _D(1) = Bytes.Byte3 +   '​ Store floating point Value To D0 And D1 
- _D(1) = (_D(1) ​<< 8) Or Bytes.Byte2 +   Bytes = Peek(Memadr(Value),​ 4) 
- Delay 1000+   ​_D(0) = (Bytes.Byte1 << 8) Or Bytes.Byte0 
 +   ​_D(1) = (Bytes.Byte3 << 8) Or Bytes.Byte2 
 +  
 +   Delay 1000
 Loop Loop
 </​code>​ </​code>​
  
 [[comfilehmi:#​comfilehmi_editor:​| Back to ComfileHMI]] [[comfilehmi:#​comfilehmi_editor:​| Back to ComfileHMI]]
comfilehmi/hmieditor_address/index.txt · Last modified: 2019/01/09 13:37 by COMFILE Technology