Hello Gokul, If the control allows access to its registers, you can read the values and control all timing issues with your LabVIEW application. Simply read the registers when you want data or setup a separate loop to read the values at a specified rate. However, if directly reading the registers is not an option, having the PLC dump data over its serial port is a legitimate way to "link" the two together but there are some timing issues to consider. Here is an example using the procedure you are considering...
I recently "linked" a LabVIEW data collection system with PLC data by simply having the PLC dump data to its serial port at designated times throughout the test. The LabVIEW application, which is actually running on a RT Field Point Module (cFP-2020), monitors the serial port and brings in the PLC data. It combines the PLC data with temperature measurements it is collecting and eventually passes "all" of the data to another external computer over Ethernet. We caused the PLC to control the overall collection rate by dumping data to the serial port each time a measurement is required. Hence, the PLC actually triggers or controls the data sampling rate. The PLC outputs an ASCII string (the measurement string) which contains several measurements, a time variable (number of secs since test start), and terminates with a CRLF. The output rate is about 10 measurement strings per second. I found a baud rate of 17200 worked well. Note - if the PLC is going to be outputting data faster than 10 Hz or your measurement string is long, you will need to increase the baud rate (transmission rate) or find another alternative. Additionally, if timing is critical, you will also need to ensure that you are "keeping-up" with the instrument. In my case, the PLC dumps pressure and flow measurements which are process critical and that need to be correlated to the temperature measurements. Therefore, it is necessary to ensure that all of the measurements (pressure, flow, temp0, temp1, temp2) are correlated in time (within reason). However, it is fine, for this application, to have temperature updates collected at about once per second (1 Hz) although the pressure and flow are collected at 10 Hz (during the first five minutes of the test and then at 1 Hz during the remaining 15 minutes). By having the PLC control the timing, it enabled the LabVIEW code to simply monitor the port, grab the completed measurement sting, combine the other measurement info, and publish the combined string to an external program and write the sting to disk. In my opinion, the programming method, using serial communication with the PLC, should be very similar to what you did with the temperature controllers although, you may have had to "request" the measurement string by writing a command to the temp controller and then reading its response. I would suggest avoiding this, simply force the PLC to write and then monitor the port for new info. Best regards, Guy R. Hughes Controlink Systems, LLC -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gokul Sent: Thursday, May 06, 2004 8:49 AM To: [EMAIL PROTECTED] Subject: Keyence and LabView Hi, I am trying to acquire data using LabView from KV16AR PLCs data memory. A program in PLC is going to dump data in PLCs data memory and LabView is going to simultaneously acquire it. The transmission is over serial port and I have done serial port acquisition before with temperature controllers. I felt both type of acquisition are the same...but still wanted to ask... Is this any different? ... I have never worked with PLCs before..thats why wanted to know. TIA Gokul __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover
