Jump to content

Recommended Posts

Posted
I am reading data from an FX2N via the COM port. I have the device Y5 desingateded as the end of cycle "part count". Currenty, in order to get the data I have to write to the plc via the com port with a sting that tells it to send back the data for the 1st Byte of the Y device. I then compare the result with a byte mask to see if the bit at position 5 is a 1 or 0. I am doing this every 200ms to make sure I can capture in changes in the bit. This all works. My question: Is there a way to configure the plc so that I all I have to do is open the com port to the PLC and just listen for the data (ie Y5 changing from a 0 to a 1) instead of having to send the write string and waiting for the response every time? The kicker is I am also reading 2 values from the X device. So I would need my program to just open the com port and wait for a "data recieved event". When this happens I would get the data, determine which device and byte it came from, and record the value. Is this possible? Thanks in advance.
Posted
I am using a vb 2005 program that I wrote to collect the data. The server it runs on is using virtual serial ports which are connected via ip to ethernet-serial converters on the other end. The plc's are connected to the ethernet-serial converters. It looks and acts just like a pc connected directly connected to plc via the com port.

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.   Restore formatting

  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...