format data.

This commit is contained in:
TAO Cheng
2014-11-07 11:46:35 +08:00
parent 70f6305ec7
commit 9953f94372
3 changed files with 12 additions and 8 deletions
@@ -188,9 +188,11 @@ LRESULT CSo7_Util_PLC_TCPIP::OnTCPIPRecv(WPARAM w, LPARAM p)
CString csTmp;
m_csMSG=_T("");
m_csMSG.Format(_T("<< Read status:%d;Data:"),g_pSo7_TCPIP->m_TCPIPData.s_status._ReadDataCompleted);
double dTmp(0.0);
for (int i=0;i<g_pSo7_TCPIP->m_TCPIPData.s_recv_data._DataSize;i++)
{
csTmp.Format(_T("%0X,"),g_pSo7_TCPIP->m_TCPIPData.s_recv_data._iData[i]);
dTmp=g_pSo7_TCPIP->m_TCPIPData.s_recv_data._lData[i]*0.001;
csTmp.Format(_T("%.4f,"),dTmp);
m_csMSG+=csTmp;
}
OutputWithScroll(m_csMSG,m_edMSG);