Hi,
I could not find an answer in the forum so I am hoping someone has come across it before.
I have to send data to a scale through a TCP Port. I will be sending an IP address, port number, and then a command as text.
Has anyone done this before?
I am thinking it should be as simple as decalring some variable, and then two lines of code like:
somevariable.open('192.168.1.15::52200');
somevariable.write('w.261.2' + formaT(weight));
Does anyone know how to open a TCP Port (I hope I am using the terminology proprely) and send this command?
Thanks,
-a
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Where do I go to add it - is there a dll somewhere I can download?
Thanks,
-a
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thanks, I just pulled these two dlls from the CD and registered them:
NSComCom2.dll
SocketBusAdapter.dll
Can you verify that the syntax of the IP address would be something like the below?
I am using 192.168.0.1 & port 52200 as examples, they would end up being parameters. Is the 'Sockets://' text necessary?
OutMsg := CC2.CreateoutMessage('Sockets://192.168.0.1::52200');
Thanks for all your help, this is helping me a lot!
-a
2) The "sockets" is name of used protocol. (like http, ftp, skype etc.). I do not know, if the components supports another protocol than "tcp/ip sockets".
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.