Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

write data to PLC register using datasockets

hello all...
i have made some headway, i can access the PLC read data from it (1-10) and depending on the random # produced i get a message from a file and display it.
Now...i need to write back to a register in the PLC with some informatio (string and integer.)
i was advised to use datasockets, my stumbling point is i have no idea how to proceed. i read a lot of posts on this form as well as the labview form on Google.
could anyone please throw some light on this, a detailed explanation or link where i may gain some information.
thank you
cheers,
-U
0 Kudos
Message 1 of 2
(3,367 Views)
How are you communicating with the PLC? I am not sure if this is a card in your computer or an external device. If it is the latter, are you using GPIB, serial, ethernet, etc.?

LabVIEW does not communicate very well to memory locations(as in custom built devices). There is no built in way to do this(although there are VIs on the web that you can use). You are usually better off writting a driver for the device in C and then calling the driver from LabVIEW. This is how NI communicates to its own hardware.

I mention this because datasocket will probably not be a good solution to your problem. It is a communication protocol developed by NI and there is no documentation on its format. Trying to hack it is not going to worth your time when you can
just use TCP instead. In simple data transfer cases between LabVIEW and high level languages, it cannot be beat, and I highly recommend it in these cases. In your case, the PLC will likely not support it.

You should look on NI's site for info on Datasocket. The KnowledgeBase, Product Manuals, and Tuturials are where I would start. Advanced Search
0 Kudos
Message 2 of 2
(3,367 Views)