Jump to content

Read Data When PLC is running rather than datatable


Recommended Posts

I need to read the data from the PLC using .net. I have read the data using Unitronics.dll .

Steps i need to do.

1) Look if the PLC cycle is running

2) if running Fetch the data on runtime (not from data table)

3) Stop if the PLC cycle is stopped

Right now i have continuously looped after each second to see the cycle and look for the data. But the PLC cycle and my .net program cycle differs in time and  which fails to get the complete data.

Is there any Listener to do this .Please give the example for the same.

Link to comment
Share on other sites

  • 2 weeks later...
  • MVP 2023

It sounds like your cycle runs rather quickly if you're doing a one second poll.  

PLC model? Serial or Ethernet?

I would buffer the data in the PLC itself while the cycle is running and read the data from there after the fact.  

You're going to have a hard time synchronizing a Windows box to a PLC at that speed.

Joe T.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...