Twincat (Balford Beckhoff) Frequently asked Questions (FAQ)-How to write parameters when initializing

Source: Internet
Author: User

The most common is to define a global variable, and then bind to the corresponding variable, for example, I define a Sint type of variable Controlword value is 8, after the definition is compiled, Can be found in the PLC program or more out of this variable (Main.controlword is our definition of output type variable, note that at%q* means output type,at%i* for input type)

Controlword at%q*:sint:=8;

?

Then I double-click on the variable, Linked to find the variable to bind to (you see only a few types show up, because Twincat only renders the same type of Sint variable)

?

The disadvantage of the previous method is not "method", more standard practice is to use the Adswrite function method to write the parameters, rather than binding. Using the function block Adswrite, the preceding parameter NetID can be two single quotes, port if the write NC is 500, the Write plc is 801, the address group and address offset are described below, srcaddr is to write the value, you can use the ADR address function, Let's leave the PLC variable name corresponding to the main function.

?

Mouse over the corresponding variable text box can prompt the current variable indexgroup and Indexoffset can view the address group and address offset

?

After clicking Write, you can see that the online value has been written in 123

?

?

For more instructional videos and downloads, please pay attention to the following information:

My Youku Space:

Http://i.youku.com/acetaohai123

?

My online forum:

http://csrobot.gz01.bdysite.com/

?

Problem Exchange:

qq:910358960

Email:[email protected]

?

?

?

Twincat (Balford Beckhoff) Frequently asked Questions (FAQ)-How to write parameters when initializing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.