<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Having problem sending a constant value to PLC using data socket. in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/437127#M213975</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Anand,&lt;/P&gt;
&lt;P&gt;What do you mean exactly when you say "same program to change the content of the register but for a different PLC program".&amp;nbsp; Do you mean that your LabVIEW program is the same but the program running on your AB PLC is different?&amp;nbsp; 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.&amp;nbsp; Also, there are many datasocket examples in the example finder.&amp;nbsp; If you select Help-&amp;gt;Find Examples and then navigate to the Networking-&amp;gt;Datasocket-&amp;gt;OPC directory you will find 5 or 6 examples involving using datasocket to read/write OPC items.&lt;/P&gt;
&lt;P&gt;I hope this helps,&lt;BR /&gt;Justin D&lt;BR /&gt;Applications Engineer&lt;BR /&gt;National Instruments&lt;/P&gt;</description>
    <pubDate>Mon, 06 Nov 2006 16:43:36 GMT</pubDate>
    <dc:creator>Justin D</dc:creator>
    <dc:date>2006-11-06T16:43:36Z</dc:date>
    <item>
      <title>Having problem sending a constant value to PLC using data socket.</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/436873#M213892</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; I am using RSLinx OPC server to communicate between Labview and the Input register of the AB PLC. I have used Datasocket earlier to switch a light on and off. but now if i use the same program to change the content of the register but for a different PLC program the value is being set and reset continuously, but i need that value to be set once i give a on option and reset when i reset. I could upload the vi that i am using if u need it.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;Can anybody send some examples on using the datasockets, and I also want a vi where I could generate square wave using pulses from an encoder.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanx in advance.&lt;BR /&gt;&lt;BR /&gt;Anand&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Nov 2006 02:00:46 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/436873#M213892</guid>
      <dc:creator>msu</dc:creator>
      <dc:date>2006-11-06T02:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem sending a constant value to PLC using data socket.</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/437127#M213975</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Anand,&lt;/P&gt;
&lt;P&gt;What do you mean exactly when you say "same program to change the content of the register but for a different PLC program".&amp;nbsp; Do you mean that your LabVIEW program is the same but the program running on your AB PLC is different?&amp;nbsp; 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.&amp;nbsp; Also, there are many datasocket examples in the example finder.&amp;nbsp; If you select Help-&amp;gt;Find Examples and then navigate to the Networking-&amp;gt;Datasocket-&amp;gt;OPC directory you will find 5 or 6 examples involving using datasocket to read/write OPC items.&lt;/P&gt;
&lt;P&gt;I hope this helps,&lt;BR /&gt;Justin D&lt;BR /&gt;Applications Engineer&lt;BR /&gt;National Instruments&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2006 16:43:36 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/437127#M213975</guid>
      <dc:creator>Justin D</dc:creator>
      <dc:date>2006-11-06T16:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem sending a constant value to PLC using data socket.</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/439893#M214986</link>
      <description>Hi justin,&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Times New Roman" size="3"&gt;&lt;SPAN style="font-size: 12pt;"&gt;
I have a program written to write a value to the &lt;BR /&gt;
register contact of a PLC through OPC server using &lt;BR /&gt;
Datasockets. but my value is being set and reset for a &lt;BR /&gt;
about 10ms or so..I dunno why it is happening, I dont &lt;BR /&gt;
find any timing elements in the program. Can you &lt;BR /&gt;
modify the program to send a constant value...without &lt;BR /&gt;
being set to the userdefined value and zero every &lt;BR /&gt;
10-20ms. &lt;BR /&gt;
&lt;BR /&gt;
I am a novice in labview so I am seeking your help, I &lt;BR /&gt;
am attaching the vi that we have created. &lt;BR /&gt;
&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 11 Nov 2006 23:31:13 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/439893#M214986</guid>
      <dc:creator>msu</dc:creator>
      <dc:date>2006-11-11T23:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem sending a constant value to PLC using data socket.</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/440323#M215121</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;msu,&lt;/P&gt;
&lt;P&gt;I don't see anything inherently wrong with your application.&amp;nbsp; Do you really need to write the value to the register so fast?&amp;nbsp; With a 0ms wait in your loop, the loop is essentially running as fast as possible.&amp;nbsp; If you just take the loop out of the program and write the value once does it still reset?&amp;nbsp; If so, this definitely seems like an issue with your PLC.&lt;/P&gt;
&lt;P&gt;-Justin D&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2006 16:55:59 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/440323#M215121</guid>
      <dc:creator>Justin D</dc:creator>
      <dc:date>2006-11-13T16:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem sending a constant value to PLC using data socket.</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/440447#M215182</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;hi justin,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;Anand&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2006 20:22:55 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/440447#M215182</guid>
      <dc:creator>msu</dc:creator>
      <dc:date>2006-11-13T20:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem sending a constant value to PLC using data socket.</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/440953#M215361</link>
      <description>&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;Hi Anand,&lt;/P&gt;
&lt;P&gt;You can use the DSC module to bind a shared variable to an item on an OPC server.&amp;nbsp; There is detailed information on how to do this in the DSC help.&amp;nbsp; Here is a link to where you can download the help from our website.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ni.com/docs/en-US/bundle/labview-datalogging-and-supervisory-control-module/page/user-manual-welcome.html" target="_blank" rel="noopener"&gt;https://www.ni.com/docs/en-US/bundle/labview-datalogging-and-supervisory-control-module/page/user-manual-welcome.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If you look under "Creating an OPC Client Instance" it will tell you how to create an OPC I/O Server step by step.&lt;/P&gt;
&lt;P&gt;-Justin D&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jan 2026 20:11:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/440953#M215361</guid>
      <dc:creator>Justin D</dc:creator>
      <dc:date>2026-01-24T20:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem sending a constant value to PLC using data socket.</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/441179#M215434</link>
      <description>Hi Justin,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;I have written a program to send a 1 as output at the start of the run button and after user defined seconds of delay the value has to change to 0.&lt;BR /&gt;But in the program i have written the case selector line is 0 first and it has to give 1 as output, but it doesnt give 1 but after the user given seconds of time the case selector line is giving a 1 but the output from the case structure is no changing. What is the mistake I am doing here?&lt;BR /&gt;&lt;BR /&gt;thanx&lt;BR /&gt;&lt;BR /&gt;anand&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Nov 2006 05:33:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/441179#M215434</guid>
      <dc:creator>msu</dc:creator>
      <dc:date>2006-11-15T05:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem sending a constant value to PLC using data socket.</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/442103#M215780</link>
      <description>&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;Hi anand,&lt;/P&gt;
&lt;P&gt;Your program just outputs one number, not a series of 2.&amp;nbsp; The "output" will remain at its previous value until the delay is up and then it will change to 1.&amp;nbsp; To do what you want, I would reccommend using a FOR loop.&amp;nbsp; In the first iteration, write a 0 to the output and have a delay.&amp;nbsp; In the second iteration you could write a 1 and exit the FOR loop.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Justin D&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jan 2026 20:12:19 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/442103#M215780</guid>
      <dc:creator>Justin D</dc:creator>
      <dc:date>2026-01-24T20:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Having problem sending a constant value to PLC using data socket.</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/630030#M291640</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Hi,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;There must be two control one location. This is very momon mistake in plc tags control.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Could you check the PLC item to see of you PLC code write value to the same tag (your tag name is Data)? Or you may be written a value to the input&amp;nbsp;port of&amp;nbsp;the PLC. The tag name on your vi(Local:7:I.Data) it looks&amp;nbsp;like an input from one of the chanel, or module&amp;nbsp;of the PLC at local 7 Input module. &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Have great day,&lt;/DIV&gt;
&lt;DIV&gt;Dam Nguyen&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by Chieudam on &lt;SPAN class="date_text"&gt;12-20-2007&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;08:17 PM&lt;/SPAN&gt;</description>
      <pubDate>Fri, 21 Dec 2007 02:17:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problem-sending-a-constant-value-to-PLC-using-data-socket/m-p/630030#M291640</guid>
      <dc:creator>Chieudam</dc:creator>
      <dc:date>2007-12-21T02:17:03Z</dc:date>
    </item>
  </channel>
</rss>

