Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Code Example Read PZEM-004T V.30 from PLC Keyence KV7500+KVL21V #90

Open
MFayH opened this issue Jul 11, 2022 · 9 comments
Open

Need Code Example Read PZEM-004T V.30 from PLC Keyence KV7500+KVL21V #90

MFayH opened this issue Jul 11, 2022 · 9 comments

Comments

@MFayH
Copy link

MFayH commented Jul 11, 2022

Is your feature request related to a problem? Please describe.
I have ordinary use the PZEM sensor with microcontroller, but I have challenges to read the sensor with PLC Keyence, and I have stucked. Any one help me?

Describe the solution you'd like
I have 15 PZEM to read with ModBUS RTU Communication Protocol. I have done to change the slave address through ESP32, and I have try to read from PLC, but still can't

Thank you in advance

@mandulaj
Copy link
Owner

I am sorry, unfortunately, the library doesn't support the PLC platform at the moment and I am not sure it ever will. Have you considered using the ESP32 to read the values from the PZEM modules and forwarding them to the PLC? I don't know that communication protocols the PLC supports, but I am sure you can set up a UART/SPI/I2C/Wifi connection that will allow you to relay the data.

@Nismonx
Copy link

Nismonx commented Jul 14, 2022

Most PLCs from that generation will handle RS232 / RS485 but you'll have to understand the protocol and be able to parse data to whatever protocol you planning on using . If you have an HMI with WiFi capability then you may be able to send MQTT packages to it but this will depend on the manufacturer (Weintek).
It's an interesting challenge you are trying to achieve so, keep us posted if you find a way around it.

Good luck

@MFayH
Copy link
Author

MFayH commented Jul 15, 2022

I am sorry, unfortunately, the library doesn't support the PLC platform at the moment and I am not sure it ever will. Have you considered using the ESP32 to read the values from the PZEM modules and forwarding them to the PLC? I don't know that communication protocols the PLC supports, but I am sure you can set up a UART/SPI/I2C/Wifi connection that will allow you to relay the data.

Thank you mandulaj for your reply, So now I know that the sensor doesn't support with PLC. But for the connection from sensor to PLC is through some devices, not directly connected :
AC Voltage -> PZEM Sensor -> TTL to RS485 Converter -> KV-L21V (Keyence PLC's Serial Module) -> KV-7500 (Keyence PLC's CPU Unit)

@MFayH
Copy link
Author

MFayH commented Jul 15, 2022

Most PLCs from that generation will handle RS232 / RS485 but you'll have to understand the protocol and be able to parse data to whatever protocol you planning on using . If you have an HMI with WiFi capability then you may be able to send MQTT packages to it but this will depend on the manufacturer (Weintek). It's an interesting challenge you are trying to achieve so, keep us posted if you find a way around it.

Good luck

Thank you Nismonx for your reply, yes of course I have used the RS485 Communication Protocol (2 wire - half duplex) from PZEM Sensor to PLC, and I think it will work because the PZEM Sensor Datasheet mention it (Application Layer Protocol - Modbus RTU). But, unfortunately it doesn't work properly.

@sergiocntr
Copy link

I don't know what your PLC know-how is, but I found this [link] (https://www.keyence.com.sg/support/user/plc/) where you can find support and assistance. Sorry if I don't help you more, 15 devices are enough for me to open a ticket.

@MFayH
Copy link
Author

MFayH commented Jul 15, 2022

So my alternative solution is, I haven't use the PLC for read the PZEM Sensor. I used the ESP32 for read the PZEM Sensor and send it to database

@sergiocntr
Copy link

sergiocntr commented Jul 15, 2022

So my alternative solution is, I haven't use the PLC for read the PZEM Sensor. I used the ESP32 for read the PZEM Sensor and send it to database

Yes this Is a way but consider this as Plan B ( my opinion of course)

@MFayH
Copy link
Author

MFayH commented Jul 15, 2022

I don't know what your PLC know-how is, but I found this [link] (https://www.keyence.com.sg/support/user/plc/) where you can find support and assistance. Sorry if I don't help you more, 15 devices are enough for me to open a ticket.

Thank you Sergiocntr for your advice. I think enough for me to use and struggle read the PZEM Sensor with PLC's haha, because my deadline is near I have to done in October until the Data Processing.

@MFayH
Copy link
Author

MFayH commented Jul 15, 2022

So my alternative solution is, I haven't use the PLC for read the PZEM Sensor. I used the ESP32 for read the PZEM Sensor and send it to database

Yes this Is a way but consider this as Plan B ( my opinion of course)

Of course, this is my Plan B. Thank you GBU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants