11-05-2006 08:00 PM
11-06-2006 10:43 AM
Anand,
What do you mean exactly when you say "same program to change the content of the register but for a different PLC program". Do you mean that your LabVIEW program is the same but the program running on your AB PLC is different? If so it just sounds like there is something in your PLC's program that is toggling the value of the register independant of LabVIEW. Also, there are many datasocket examples in the example finder. If you select Help->Find Examples and then navigate to the Networking->Datasocket->OPC directory you will find 5 or 6 examples involving using datasocket to read/write OPC items.
I hope this helps,
Justin D
Applications Engineer
National Instruments
11-11-2006 05:31 PM
11-13-2006 10:55 AM
msu,
I don't see anything inherently wrong with your application. Do you really need to write the value to the register so fast? With a 0ms wait in your loop, the loop is essentially running as fast as possible. If you just take the loop out of the program and write the value once does it still reset? If so, this definitely seems like an issue with your PLC.
-Justin D
11-13-2006 02:22 PM
hi justin,
Is there any other way i could send the data to the plc registry content apart from using the datasockets. Can we use DSC module to acheive that. if so can u send me some simple examples on how to send the value to the register content of the PLC and how to use them in a program.
Thank you
Anand
11-14-2006 01:22 PM
Hi Anand,
You can use the DSC module to bind a shared variable to an item on an OPC server. There is detailed information on how to do this in the DSC help. Here is a link to where you can download the help from our website.
http://digital.ni.com/manuals.nsf/websearch/642E46FEB461C3A7862571D3000B86CB
If you look under "Creating an OPC Client Instance" it will tell you how to create an OPC I/O Server step by step.
-Justin D
11-14-2006 11:33 PM
11-16-2006 09:06 AM
Hi anand,
Your program just outputs one number, not a series of 2. The "output" will remain at its previous value until the delay is up and then it will change to 1. To do what you want, I would reccommend using a FOR loop. In the first iteration, write a 0 to the output and have a delay. In the second iteration you could write a 1 and exit the FOR loop. I would also really reccommend that you go through our "Learning LabVIEW in 3 Hours" tutorial. Here is a link:
http://zone.ni.com/devzone/cda/tut/p/id/5247
-Justin D
12-20-2007 08:09 PM - edited 12-20-2007 08:17 PM