Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PLC Modbus communication
#1
How can i communicate with plc (Plc as a master)? How plc can change my parameter ? For example plc wants to change or read my maxhumidity parameter, how can plc know maxhumidity modbus adress(for example 4x2002) ? Can you explain all phase communication, i dont know maybe assign modbus address, if plc change my parameter how can i catch and change parameter, ..? I hope it was understandable.
Reply
#2
i don't understand your means. if you can draw a photo will be better.
Reply
#3
(10-04-2024, 11:59 PM)admin Wrote: i don't understand your means.  if you can draw a photo will be better.

I want to be my kc868 as a slave. Because i will be added to a modbus bus. In other words, an HMI will send me data and read my data.

Q1) Is this possible with Serial library(Serial.print, Serial.read, ...) ? ( I think it is )
Q2) How do I make this communication (HMI and KC868) ?
Q3) How do I determine my slave number?
Q4) How do I know which data HMI/PLC want to read or change ?


Attached Files Image(s)
   
Reply
#4
1. Yes, it's ok
2. you need to write program code for support HMI, such as use Arduino IDE.
3. write your own code to set slave address.
4. according to your own code.
so all need you write your own software code.
Reply
#5
(10-06-2024, 12:46 AM)admin Wrote: 1. Yes, it's ok
2. you need to write program code for support HMI, such as use Arduino IDE.
3. write your own code to set slave address.
4. according to your own code.
so all need you write your own software code.

The HMI code was written by someone else and I will be included in that network. How do I catch the incoming data? Is it like this: Serial2.read()
Reply
#6
yes, if you will use arduino IDE, just use "serial" component.
Reply
#7
(10-06-2024, 12:41 PM)admin Wrote: yes, if you will use arduino IDE, just use "serial" component.

I ask for clarification.

Receiving data from HMI and processing it (changing a variable value etc.) : Serial.read()
Sending data to HMI (HMI to read my data) : Serial.print(...)
Reply
#8
yes, you are right.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)