How Can I Prevent DataSocket from Resetting Value to Zero When a Write Connection Is Made?Primary Software: LabWindows/CVI Development Systems>>Full Development SystemPrimary Software Version: 5.5 Primary Software Fixed Version: N/A Secondary Software: Other NI Software>>DataSocket
Problem: When connecting to a DataSocket or OPC Server in Write mode, the first value written to the server is always zero. How can I make it so that DataSocket does not initialize the value when the connection to the server is made? Solution: When calling the DS_Open function to open a connection for a specified tag, the second parameter represents the access mode. This is a bit-oriented parameter, so each bit is interpreted separately. If bit number 6 is set, DataSocket won't change the tag value. To set this bit, add 64 to the parameter value. For example: hr = DS_Open ("opc:/Server1/Item1", DSConst_Write | 64, NULL, NULL, &opcHandle); Related Links: KnowledgeBase 1TB9LPWV: How Do I Set an Initial Value for a DataSocket/OPC Connection in LabVIEW? Attachments:
Report Date: 07/18/2000 Last Updated: 05/28/2004 Document ID: 1ZHCF7J6 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
