发布于 2009-12-01 16:08:43
1楼
以下代码或许对楼主有所帮助,在MP370测试通过,应该对于MP277也可以,但较便宜的屏应该不支持.
Dim f, path
path = "\Storage Card2\textfile.csv"
On Error Resume Next
Set f = CreateObject("FileCtl.File")
If Err.Number <> 0 Then
ShowSystemAlarm "Error #" & CStr(Err.Number) & " " & Err.Des cription
Err.Clear
Exit Sub
End If
'打开文件
f.open path , 2
If Err.Number <> 0 Then
ShowSystemAlarm "Error #" & CStr(Err.Number) & " " & Err.Des cription
Err.Clear
Exit Sub
End If
'写参数值
f.LinePrint("material; " & szMaterial & ";")
f.LinePrint("pressure; " & nPressure & "; mbar;")
f.LinePrint("temperature; " & nTemperature & "; °C;")
f.Close
Set f = Nothing
ShowSystemAlarm "Storage of the data was successful!"