Click here to Skip to main content
Sign Up to vote bad
good
See more: C++WindowsTCP/IP
I have an alarm module(Adam 6066). I would like to communicate with this module from my c++ program. I am working on Windows platform. I have read the manual and it says it supports Modbus/TCP, TCP, UDP protocols. I am not sure how to start with it. Any suggestions or sample code will be of great help.
Posted 21 Jan '13 - 9:57
Vin$hi350


2 solutions

Quote:
I have read the manual and it says it supports Modbus/TCP, TCP, UDP protocols
which means you can communicate with the device though sockets to read/write data to it.
 
The normal procedure is go through their manual on how to configure your device, the manual will also have sample code/application how to read/write to the device.
 
You might need to implement a socket communication program in your application to read/write data to your device. take a look at this article[^] on socket programming in C++. Also refer the manual for how to send/receive data
  Permalink  
Comments
Vin$hi - 22 Jan '13 - 10:02
The manual has sample code in Java and C# .net but nothing in c++. So, if i use socket programming to communicate with the device it should work right?
Mohibur Rashid - 22 Jan '13 - 20:11
you will have to know how to convert other programming language to your preferred language and no one will teach you that
jibesh - 22 Jan '13 - 20:17
Yes its just the string commands to send across. If you refer the manuals and C# or Java samples you can do that effortlessly. and again if you have any trouble CP is ready to help you so no worries Good Luck.
Vin$hi - 23 Jan '13 - 9:54
Thank you. That is really motivating. I will work on this and if i have any doubts will post it here.
MODBUS is a relatively simple protocol. The first two entries of a Google quick search are two useful documents: I've got the CRC implementation (C source code) from the first one: "Modicon
Modbus Protocol - Reference Guide"
[^] and used the second one, namely: "MODBUS APPLICATION PROTOCOL SPECIFICATION"[^] as reference.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 318
1 Sergey Alexandrovich Kryukov 143
2 Mohammed Hameed 123
3 Santhosh G_ 108
4 Lohith Korupolu 85
0 Sergey Alexandrovich Kryukov 8,266
1 OriginalGriff 6,306
2 CPallini 3,528
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid