Get analogue values from Arduino

This is the main technical forum for discussing problems that were encountered by users while developing PROMOTIC applications, and their possible solutions.

Get analogue values from Arduino

Postby mfaizolmi » Thu 06. Nov 2014 9:23:24

Hi,

i am trying to get analog value from Arduino. I programmed the arduino to send the analogue value (controlled by a potentiometer) through USB COM8...
the value sent by arduino, should be shown by promotic.

however, i am not sure which protocol to be used.up until now, i only have been using the NET0 protocol, COM8 (which is the same COM as being used by arduino).

1. is using the same COM correct?
2. does the protocol i am using is correct?
3. what is the configuration i need to use?


FYI,
i modified the Comm setting in the tutorial (parameter "Temperature"), hoping that i can get the analog value from my arduino.
my only objective is to get input from arduino and show it in promotic (graph, text, meter or anything).

sorry if my english is bad.
thanks.
mfaizolmi
 
Posts: 1
Joined: Fri 31. Oct 2014 2:06:54

Re: Get analogue values from Arduino

Postby admin » Thu 13. Nov 2014 10:31:16

Hello,

There are several ways how PROMOTIC SCADA can communicate with Arduino boards:

1) If the Arduino communicates using some non-standardized protocol (e.g. a protocol developed by yourself for your own purposes, etc.) then you can use the PmChar communication driver and define your own messages as needed:

http://www.promotic.eu/en/pmdoc/Subsyst ... /kCHAR.htm

This approach is used quite often, but it requires reasonable level of expertise in the communication field.

2) So in this case, I would recommend using the standardized Modbus protocol that is supported by both Arduino and PROMOTIC. Some basic information regarding Arduino Modbus libraries can be found here:

http://forum.arduino.cc/index.php?topic=230121.0
http://forum.arduino.cc/index.php?topic=176142.120
http://forum.arduino.cc/index.php?topic=40266.0

Google yourself for more details.

From the PROMOTIC side, the Modbus protocol is fully supported. I would recommend using PROMOTIC as Modbus master and Arduino as Modbus slave. This is the easiest option for configuration. Please study:

http://www.promotic.eu/en/pmdoc/Subsyst ... Modbus.htm
http://www.promotic.eu/en/pmdoc/Subsyst ... dbusMr.htm

There are many examples and preconfigurations prepared for you to use in the PROMOTIC SCADA so you do not have to start your project from scratch:

http://www.promotic.eu/en/pmdoc/Subsyst ... PreCfg.htm
http://www.promotic.eu/en/pmdoc/EditorA ... r_Comm.htm
http://www.promotic.eu/en/pmdoc/EditorA ... r_Full.htm
http://www.promotic.eu/en/pmdoc/EditorA ... r_Base.htm

I hope this helps.
admin
Administrátor
 
Posts: 69
Joined: Wed 12. Dec 2012 15:43:09


Return to I don't know how to...

Who is online

Users browsing this forum: No registered users and 5 guests

cron