УкраїнськаEnglishmRussian
Вход/Новый
В теме много сообщений

OpenScada and Serial port


Автор Сообщение
Сообщение создано: 30. 11. 2012 [18:17]
citrizin
Abolfazl
Создатель темы
Зарегистрирован(а) с: 04.10.2012
Сообщения: 19
Hi all
Where can I find a step by step guide for serial port in oscada?
I read the demo documentation but I did not find anything useful.

I just want to communicate with a GSM modem.
Сообщение создано: 01. 12. 2012 [16:09]
roman
Roman Savochenko
Moderator
Contributor
Developer
Зарегистрирован(а) с: 12.12.2007
Сообщения: 3747
"citrizin" wrote:

Where can I find a step by step guide for serial port in oscada?
I read the demo documentation but I did not find anything useful.

I just want to communicate with a GSM modem.

Partialy you can this find into "QuickStart" and the manual's videoaddon (only Russian) for DAQ, and other things represented enought into "Transport.Serial" manual.

Learn, learn and learn better than work, work and work.
Сообщение создано: 05. 12. 2012 [23:14]
citrizin
Abolfazl
Создатель темы
Зарегистрирован(а) с: 04.10.2012
Сообщения: 19
"roman" wrote:

"citrizin" wrote:

Where can I find a step by step guide for serial port in oscada?
I read the demo documentation but I did not find anything useful.

I just want to communicate with a GSM modem.

Partialy you can this find into "QuickStart" and the manual's videoaddon (only Russian) for DAQ, and other things represented enought into "Transport.Serial" manual.


Hi Roman
I have read "QuickStart" 2 times by now. to the end of the 4th part. But Unfortunately the english is poor and I can not understand what does the author actually means...
I can create a serial port object but I dont know how to send some bytes via that object. I guess I need an another module which can generate some bytes for the serial object. I will be thankful if you can help me about that.
Сообщение создано: 06. 12. 2012 [15:53]
roman
Roman Savochenko
Moderator
Contributor
Developer
Зарегистрирован(а) с: 12.12.2007
Сообщения: 3747
"citrizin" wrote:

I have read "QuickStart" 2 times by now. to the end of the 4th part. But Unfortunately the english is poor and I can not understand what does the author actually means...

About transport "Serial" using from DAQ modules shortly described into part 4.1:
Other types transports created by like to "Sockets" method, but configuration typical different only at record format for address and timings. In case of transport module "Serial" into address field write the path to serial device, speed, and format. For converters USB->Serial that address you need learn into operation system, for example by console command "$ dmesg", just after the converter connection.


"citrizin" wrote:

I can create a serial port object but I dont know how to send some bytes via that object. I guess I need an another module which can generate some bytes for the serial object. I will be thankful if you can help me about that.

Some bytes ordinary sent: DAQ module, the user by tab "Request" or from user's script by user API function SYS.Transport.messIO()

Learn, learn and learn better than work, work and work.
Сообщение создано: 20. 12. 2012 [08:08]
citrizin
Abolfazl
Создатель темы
Зарегистрирован(а) с: 04.10.2012
Сообщения: 19
Hi roman and thanks for the answer. See I have got this far (step by step)

1- sudo openscada_demo (sudo to have access to serial ports)
2- I open the Demo Station
3- Under Data Accquisition I select Module and then ModBUS and then choose KM101
4- I set the Transport Address Serial.testModem
5- Then I go to Transports and under serial interfaces and Output transport I select "Test Modem"
6- I set my device address in the Address field and do not change anything else
it will be in fact:
/dev/ttyUSB0:38400:8N1::0679859815

my device is a HUAWEI GSM Modem which I have communicated with it via serial port previously and is working. The only thing I want to do is to send two bytes "A" and "T" to this modem and recieve its response (which is "O" and "K" I think).

7- I check the "Running" checkbos for the "Test Modem" and the program crashes...


I will be thankful if u can tell me exactly what further step should I take in order to recieve the data bytes... and please tell me step by step... I can not figure what your docmuntations are all about (sorry)

attached I have put screen shots of my configurations

Thanks in advance
Вложенный файл

Screenshot from 2012-12-20 09:36:50.png (Тип файла: image/png, Размер: 259.62 килобайт) — 2203 загрузок
Screenshot from 2012-12-20 09:37:26.png (Тип файла: image/png, Размер: 237.28 килобайт) — 2407 загрузок
Сообщение создано: 20. 12. 2012 [08:44]
roman
Roman Savochenko
Moderator
Contributor
Developer
Зарегистрирован(а) с: 12.12.2007
Сообщения: 3747
"citrizin" wrote:

1- sudo openscada_demo (sudo to have access to serial ports)

Why? You need configure permit to the serial devices.

"citrizin" wrote:

6- I set my device address in the Address field and do not change anything else
it will be in fact:
/dev/ttyUSB0:38400:8N1::0679859815

On your screen shot you do not applied the address!
And why my telephone number left?

"citrizin" wrote:

7- I check the "Running" checkbos for the "Test Modem" and the program crashes...

What OpenSCADA version used?
On OpenSCADA work version I have not any crash.
Send me crash report: http://wiki.oscada.org/HomePageEn/Doc/CrashReport

Learn, learn and learn better than work, work and work.
Сообщение создано: 20. 12. 2012 [16:27]
citrizin
Abolfazl
Создатель темы
Зарегистрирован(а) с: 04.10.2012
Сообщения: 19
Hi Ididnt know that was your number and I dont know what to put there instead?! may u tell me what to put there?

u can check the version in the screen shot, but I downloaded the whole program just a month ago

I guess thats not a bug but a problem with my configuration. may u tell me how to configure it for my purpose? I just need to send bytes and recieve the response.

thanks
Вложенный файл

Screenshot from 2012-12-20 17:54:30.png (Тип файла: image/png, Размер: 240.87 килобайт) — 2028 загрузок
Сообщение создано: 20. 12. 2012 [18:59]
roman
Roman Savochenko
Moderator
Contributor
Developer
Зарегистрирован(а) с: 12.12.2007
Сообщения: 3747
"citrizin" wrote:

u can check the version in the screen shot, but I downloaded the whole program just a month ago

This is 0.8.0.4 LTS and on it version the Modem mode work fine also.

"citrizin" wrote:

I guess thats not a bug but a problem with my configuration. may u tell me how to configure it for my purpose? I just need to send bytes and recieve the response.

I have test the Modem mode and all work fine for me. Also I have add print modem connection process to console and the messages archive: http://wiki.oscada.org/HomePageEn/Doc/ProgrammManual/part4/files?get=subsys_arch_mess_en.png , for work version.

Learn, learn and learn better than work, work and work.
Сообщение создано: 20. 12. 2012 [19:08]
citrizin
Abolfazl
Создатель темы
Зарегистрирован(а) с: 04.10.2012
Сообщения: 19
you mean I was right about the configs?

may u please tell me what to do to reach to the state in the screenshot? If I'm right with the configs I still do not know how to send specific bytes to the modem. May u please tell me how to send bytes?

thanks for your notice
Сообщение создано: 20. 12. 2012 [19:22]
roman
Roman Savochenko
Moderator
Contributor
Developer
Зарегистрирован(а) с: 12.12.2007
Сообщения: 3747
"citrizin" wrote:

you mean I was right about the configs?

Path to serial device and Telephone number set correct for self.
Next establish the connection, by set "Running".
Next into appear tab "Request" http://wiki.oscada.org/HomePageEn/Doc/ProgrammManual/part4/files?get=subsys_tr_mod_tr_otr_req_en.png write and send your bytes.

And carefully read the documentation before next questions!

Learn, learn and learn better than work, work and work.



21755