LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To control the output of a PLC by a button in labiew(machine vision application) through opc server

I did an application of machine vision, it detect if the object congruent or not, when I detect a nonconforming object (with default) a led is lit, I have to send this information to a plc s7-1200, which activate The actuator in order to eject the defective object,                      

I did the connection with opc server, but it did not work, the problem I was able to turn on the led (in the labview) with the PLC, but the reverse I can not do it, I I have to activate the output of the PLC with the led (in labview), How can i do that ?!

thank you 

0 Kudos
Message 1 of 9
(3,485 Views)

i use labview 2014, and "tia portal v13" to programme the plc, NI opc server or kepserver v5

0 Kudos
Message 2 of 9
(3,481 Views)

i use labview 2014, and "tia portal v13" to programme the plc, NI opc server or kepserver v5

the led in labview wich activate plc, it must be read only or write only, or i choose read and write.

thanks

 

0 Kudos
Message 3 of 9
(3,477 Views)

Hi aif99,

 

Let me see if I can summarize your problem. You are using LabVIEW 2014 with NI OPC Servers, and a PLC that can be programmed with "tia portal v13". You want to use LabVIEW to write to a register on the PLC, so that it can activate the actuator in your system to eject the defective object.

 

The problem is, you were not able to write to a register on the PLC. You were, however, able to write to LabVIEW from the PLC.

 

Is the above a correct description of your problem?

 

If so, I would want to know if you received any errors in LabVIEW, what register (or tag) on the PLC you are writing to, and if you are able to activate the actuator from a different software tool besides LabVIEW.

Thanks,

Rita Prather
Software Product Manager
rita.prather@ni.com
National Instruments
0 Kudos
Message 4 of 9
(3,425 Views)

it is exactly that

I do not get any errors in LabVIEW, and I can activate the actuator by a button in TIAPORTAL software and it works. Now i can send to plc from labview variable of type word (i can send numeric value), but i can not send a value booleen (true)  

Regards,

0 Kudos
Message 5 of 9
(3,419 Views)

Is it possible to read the byte in which you want to change the boolean value, make a change by adding 2^location and writing the byte back in?


GCentral
0 Kudos
Message 6 of 9
(3,407 Views)

Thank you very much for your answers, I found the solution, now it works very well and I can send to the PLC from Labview, the solution is: if i want to write in plc the variable in labview that controle the plc in access type (right click in this variable>properties>data pinding>access type) we must choose "WRITE only" (or read/write), but not read only this is was my fault.

That's what I did to solve the problem:

- i reinisialize the  opc (Runtime>Reinisialize)

 - I create a variable in opc with the menimonic address (ex: MW0.0 , MW30, MW40...)

- in client acess, i choose "write and read"

- and the most important (that's what solved the problem) the bound variabe in labview it must be "WRITE ONLY"

 

0 Kudos
Message 7 of 9
(3,396 Views)

please , I did the same thing that you said, but nothing .Always same problem with me too

0 Kudos
Message 8 of 9
(2,827 Views)

Hi RAUNIs,

 

Can you describe your situation in more detail, including all the same information as the original post and answering the questions Rita and aif99 asked? This will give us more information to work with.

 

This thread is over a year old, so I recommend posting this information to a new thread for a better chance of getting help.

0 Kudos
Message 9 of 9
(2,818 Views)