LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Writing data to AB PLC using RSLinx and DataSockets

Hi
 
  I am trying to write a value to a input registry of a module in AB logix 5000 plc using RSlinx opc server and datasockets. I have used the datasocket write to accomplish this, but the value that i give is written to the plc but it being switched between 0 and the user defined values for every 20ms. But I want to send a constant value to the PLC.
 
 I am attaching the vi I have created , plz go through and modify if necessary and give me some feedback about this.
 
I am a novice at labview so plz help me out. I tried to find simple examples on datasocket write but couldnt find any simple ones.
 
Thank you
 
Anand
0 Kudos
Message 1 of 3
(2,930 Views)
Anand,

If you remove the while loop and write a single value to the PLC does it not maintain that value?  It is possible that your very fast loop rate in you VI is causing the PLC to miss values, but I don't know why that would be converting it to what looks like the default value.  I might verify that you have the OPC server set up correctly.  Here is a link to a tutorial about setting up RSLinx and connecting to that with LabVIEW. 

Please let me know how this turns out!  Thanks!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 2 of 3
(2,915 Views)
Hi Andy,

  I have got the problem fixed, instead of assign a input module bit I have just used normal tag and tried the same program and it worked.

Thanx for the help

Anand
0 Kudos
Message 3 of 3
(2,912 Views)