Hi there
Is it possible to use this to open the com1 port? If so, how do you reference it? Ihave searched the help and Mibuso but not found any example of a com port being opened. If not this any other suggestions?
I need to read the weight from a scale sent through RS232. I have tried nfcomm but could not get it working and mscomm has got licence issues.
Regards - Noeline
0
Comments
sorry, you can not use the socketbusadapter for this task, it can only be used for TCP connectivity.
You can use the MSCOMM32.OCX automation server to access the com port.
In case you need an example, I can dig for some sapmle code.
MCP+I, MCSE NT, Navision MCT (2004,2005)
I have tried mscomm32 but have a license issue on the client computer and don't know how to obtain a license. ](*,)
Anyhow, I will follow that up now if Navision Automation won't work.
So if you do not have VS, this doesn't seem to help. Let me check, I remember a free solution but do not recall it by heart. I'll keep you posted
MCP+I, MCSE NT, Navision MCT (2004,2005)
I found a free OCX called NetComm.OCX which basically does what MSComm32 does. I will test it this week when I visit the client and report back if I am sucessful.
in case your test fails, I could recompile the automation server I was using long time ago. (Which is simply based on WIN32 API and doesn't need the MSCOMM32 at all)
MCP+I, MCSE NT, Navision MCT (2004,2005)
Thanks for your help though. Much appreciated.
Hi Noeline,
would you like to share the code for the Netcomm?
i am using the netcomm for the AT command. And my code does not work.
How can i append the "enter" or the "ctrl+z" at the output command?
I would like to use SENDKEY, but the NetComm only accept the string, i have to build the string before passing into the Netcomm.Output.
strSetting := '115200,N,8,1';
strSetToTextMode := 'at+cmgf=1' + char13;
NetComm.Settings := strSetting;
NetComm.CommPort := 12;
NetComm.PortOpen := TRUE;
NetComm.Output := strSetToTextMode;
strOutputText := 'at+cmgs=' + Customer."Phone No." + char26+char13 ;
NetComm.Output(strOutputText);
Thank you.
Regards
Rachel
The working code should be :
==============================================
C13 and C26 has been declared as a variable, Char datatype. 13 and 26 is the ASCII for enter and ctrl+Z.
=========================================
C13 := 13;
C26 := 26;
strSetting := '115200,N,8,1';
strSetToTextMode := 'at+cmgf=1' + FORMAT(C13);
NetComm.Settings := strSetting;
NetComm.CommPort := 12;
NetComm.PortOpen := TRUE;
NetComm.Output := strSetToTextMode;
strOutputText := 'at+cmgs=' + strMobileNo +
FORMAT(C13) + strSMS + FORMAT(C26) +
FORMAT(C13);
NetComm.Output(strOutputText);
NetComm.PortOpen := FALSE;