Method for realizing PLC port control by C language in digital control machine tool system
A numerical control machine tool and port control technology, applied in the direction of digital control, memory system, program control design, etc., to achieve the effect of solving the difficult to understand PLC language, simple and convenient processing process, and wide application range
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0023] In order to make the technical means, creative features, goals and effects achieved by the present invention easy to understand, the present invention will be further described below in conjunction with specific illustrations.
[0024] see figure 1
[0025] 1. Obtain port information in the timer, and the address of the port and other information
[0026] To use C language to control the port, we must first obtain the information of the port. Our timer has high precision and scans once every 20 milliseconds to obtain the current state of the port.
[0027] How to get the port address:
[0028] 11. The addressing method of the physical port:
[0029] The physical ports are divided into input ports and output ports, which are addressed by channels, and each channel has 32 numbers, that is, each channel can accommodate 32 ports. Among them, 100 channels are divided for the input port and the output port, which means that the system can accommodate 3200 physical input ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 