Written on: 18. 02. 2011 [17:49]
|
gustavo
Gustavo Duarte
Topic creator
registered since: 02.02.2011
Posts: 10
|
Hi,
We have to read data from a balance machine connected to serial port of OPENScada server.
Measurements of object wieight are send by balance as bit sream in proprietary protocol format.
Our question is, what is the "best practice" to do this ?
Thanks in advance.
Gustavo.
|
Written on: 18. 02. 2011 [18:25]
|
Maxim
Maxim Lisenko
Contributor
registered since: 18.08.2008
Posts: 141
|
Hi! To read the data under the proprietary protocol you should use "User protocol"( http://wiki.oscada.org/HomePageEn/Doc/UserProtocol ) or directly use the JavaLikeCalc ( http://wiki.oscada.org/HomePageEn/Doc/JavaLikeCalc ). This question was already discussed in the forum : http://oscada.org/en/forum/posts/adaption/custom_protocol/ .
|
Written on: 14. 03. 2011 [19:54]
|
gustavo
Gustavo Duarte
Topic creator
registered since: 02.02.2011
Posts: 10
|
Hi, I come back with this issue after some time.
I have read the thread in wich a similar case was discussed with socket instead serail interface.
I underestand that Roman suggested that it has to put in DAQ->javalike base calculator->controller a code like this :
//GET request
req = SYS.XMLNode("GET");
req.setAttr("URI","/");
SYS.Transport.Sockets.out_testHTTP.messIO(req,"HTTP");
test = req.text();
Where is exactly we have to put this code ? We have to create a controller function and in i have to write the code inside controller function and after that we have to relate this controller function with the controller ?
If I want to read from serial interface instead send a request by socket, could you explain me a high level steps tha we have to follow to do this ?
Thanks in advance.
Gustavo Duarte.
|
Written on: 15. 03. 2011 [10:06]
|
roman
Roman Savochenko
Moderator Contributor Developer
registered since: 12.12.2007
Posts: 3750
|
"gustavo" wrote:
If I want to read from serial interface instead send a request by socket, could you explain me a high level steps tha we have to follow to do this ?
See to example for SYS.Transport.messIO() here: http://wiki.oscada.org/HomePageEn/Doc/ProgrammManual?v=ksv#h946-10
Learn, learn and learn better than work, work and work.
|
Written on: 15. 03. 2011 [14:51]
|
gustavo
Gustavo Duarte
Topic creator
registered since: 02.02.2011
Posts: 10
|
Roman,
Thanks for your quickly answer.
One doubt more, where we have to put this code ? DAQ->javalike base calculator->controller ?
Thanks in advance.
Gustavo.
|
Written on: 15. 03. 2011 [17:19]
|
roman
Roman Savochenko
Moderator Contributor Developer
registered since: 12.12.2007
Posts: 3750
|
"gustavo" wrote:
One doubt more, where we have to put this code ? DAQ->javalike base calculator->controller ?
Create self new JavaLikeCalc controller or use presented from DemoDB and place it.
Learn, learn and learn better than work, work and work.
|
Written on: 15. 03. 2011 [18:34]
|
gustavo
Gustavo Duarte
Topic creator
registered since: 02.02.2011
Posts: 10
|
"roman" wrote:
"gustavo" wrote:
One doubt more, where we have to put this code ? DAQ->javalike base calculator->controller ?
Create self new JavaLikeCalc controller or use presented from DemoDB and place it.
Thanks, we will try your suggestion and let to know result.
|