jtaylor42 Posted May 18, 2006 Report Posted May 18, 2006 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. Quote
Sergei Troizky Posted May 19, 2006 Report Posted May 19, 2006 You did not specify what is communicating with your PLC. What device or software? Quote
jtaylor42 Posted May 19, 2006 Author Report Posted May 19, 2006 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. Quote
Sergei Troizky Posted May 19, 2006 Report Posted May 19, 2006 Then why don't you use ready DDE driver? Quote
jtaylor42 Posted May 19, 2006 Author Report Posted May 19, 2006 Where do you get the dde driver and how does it work? Do you have a link to some docmentation on it? Quote
Sergei Troizky Posted May 19, 2006 Report Posted May 19, 2006 (edited) Email me to truyzky@yahoo.com for the DDE driver details. Edited May 19, 2006 by Sergei Troizky Quote
Recommended Posts
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.