SBA.OpenSocket

Noeline
Member Posts: 54
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
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
-
Noeline wrote: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
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.Torsten
MCP+I, MCSE NT, Navision MCT (2004,2005)0 -
Thanks for the response.
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.0 -
Noeline wrote:Thanks for the response.
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 postedTorsten
MCP+I, MCSE NT, Navision MCT (2004,2005)0 -
Me again
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.0 -
Noeline wrote:Me again
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)Torsten
MCP+I, MCSE NT, Navision MCT (2004,2005)0 -
The NetComm.OCX appears to be working. Still need to set it up properly in the app, but so far so good.
Thanks for your help though. Much appreciated.0 -
Noeline wrote:The NetComm.OCX appears to be working. Still need to set it up properly in the app, but so far so good.
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
Rachel0 -
Dear All,
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;0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions