Повідомлення створено: 18. 02. 2011 [17:49]
|
gustavo
Gustavo Duarte
Автор теми
Зареєстрован(а) с: 02.02.2011
Повідомлення: 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.
|
Повідомлення створено: 18. 02. 2011 [18:25]
|
Maxim
Maxim Lisenko
Contributor
Зареєстрован(а) с: 18.08.2008
Повідомлення: 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/ .
|
Повідомлення створено: 14. 03. 2011 [19:54]
|
gustavo
Gustavo Duarte
Автор теми
Зареєстрован(а) с: 02.02.2011
Повідомлення: 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.
|
Повідомлення створено: 15. 03. 2011 [10:06]
|
roman
Roman Savochenko
Moderator Contributor Developer
Зареєстрован(а) с: 12.12.2007
Повідомлення: 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.
|
Повідомлення створено: 15. 03. 2011 [14:51]
|
gustavo
Gustavo Duarte
Автор теми
Зареєстрован(а) с: 02.02.2011
Повідомлення: 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.
|
Повідомлення створено: 15. 03. 2011 [17:19]
|
roman
Roman Savochenko
Moderator Contributor Developer
Зареєстрован(а) с: 12.12.2007
Повідомлення: 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.
|
Повідомлення створено: 15. 03. 2011 [18:34]
|
gustavo
Gustavo Duarte
Автор теми
Зареєстрован(а) с: 02.02.2011
Повідомлення: 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.
|