The content of the invention
It is an object of the invention to provide a kind of power controller communication mode automatic switching method, which can be logical in analog quantity
Switch between letter and digital quantity communication, so as to avoid communicating the technique or the plant issue that freely do not cause.
For achieving the above object, a kind of technical scheme of present invention offer is as follows:
A kind of power controller communication mode automatic switching method, for controlling the logical of power controller and a PLC devices
Communication between letter module and analog output module, wherein, the communication mode of power controller at least includes:Analog quantity is led to
Letter mode and digital quantity communication mode, method comprise the steps:A), under digital quantity communication mode, by setting power value and
Feedback power value is exported to communication module;B), the CPU of PLC devices is according to setting power value and the diversity judgement of feedback power value
Whether power controller communicates not smooth;If c), the CPU of PLC devices judges that power controller communication is not smooth, it indicates that a switching control
The communication mode of unit power switched controller processed;D), switch control unit switches over action, by the communication of power controller
Mode switches to analog quantity communication mode;Wherein, in digital communication mode, power controller is input into given side via digital quantity
Mouth is communicated with digital signal with communication module;In analog quantity communication mode, power controller is given via analog input
Port is communicated with analogue signal with analog output module.
Preferably, the CPU of PLC devices calculates difference between setting power value and feedback power value and accounts for the hundred of setting power value
Divide ratio, if the percentage ratio absolute value of difference is more than the first percentage threshold, and the percentage ratio absolute value of difference is more than the 100th
The state than threshold value is divided to maintain more than after very first time threshold value, the CPU of PLC devices judges that power controller communication is not smooth.
Another object of the present invention is to provide a kind of power controller communication mode automatic switchover system, which can be in power
When controller is not smooth with plc communication so that power controller switches to analog quantity communication mode by digital quantity communication mode.
This realizes above-mentioned purpose, and it is as follows that the present invention provides another technical scheme:
A kind of power controller communication mode automatic switchover system, including a power controller and a PLC devices, PLC
Device at least includes:Communication module, which is communicated with digital signal with power controller, and what receiving power controller was exported sets
Determine performance number and feedback power value;CPU, which is according to the diversity judgement power controller between setting power value and feedback power value
Whether communicate not smooth;Analog output module, which is communicated with analogue signal with power controller;Wherein, automatically switch and be
System also includes:Switch control unit, communicates to power controller not smooth judgement according to CPU, control power controller select with
Analog output module is communicated with analogue signal.
Preferably, switch control unit includes the digital output module and a relay of PLC devices, relay it is normally opened
Contact two ends connect the input port switching X2 and common port M of power controller, digital output module control relay respectively
On off operating mode, normally opened contact open when, power controller communicates with communication module, normally opened contact closure when, power controller
Selection is communicated with analog output module.
Power controller communication mode automatic switching method and system that the present invention is provided, can communicate and numeral in analog quantity
Switch between amount communication so that remain between power controller and control PLC and reliably communicate, so as to avoid Power Control
Technique or plant issue that device communication does not freely cause.The system structure is simple, implement convenient, low cost, easy to utilize.
Specific embodiment
Below in conjunction with the accompanying drawings, the specific embodiment of the present invention is described in further detail.
It should be noted that the present invention implement in the power controller that adopts, at least including digital quantity input given side mouth,
Analog input gives port, switching control input port, wherein, power controller can via its digital quantity input given side mouth
Digital quantity communication is carried out with external devices, can be communicated with external devices simulation amount via the given port of its analog input,
Its input port switching is used to change the configuration parameter of power controller, and configuration parameter may be selected power controller and carry out digital quantity
Communication or analog quantity communication.
As shown in figure 1, first embodiment of the invention provides a kind of power controller communication mode automatic switchover system, this is
System includes:SCR power controllers 100, PLC devices and relay 30, host computer 40.The PLC devices specifically include CPU again
200th, communication module 201, analog output module 202 and digital output module 203.
Wherein, communication module 201 is acquiescently communicated with digital signal with SCR power controllers 100, communication module
The 201 setting power values and feedback power value for receiving 100 output of SCR power controllers, CPU 200 is according to setting power value and instead
Whether the diversity judgement SCR power controllers 100 between feedback performance number communicate not smooth;Analog output module 202 and SCR power
Controller 100 is communicated with analogue signal;Digital output module 203 and relay 30 consist of a switch control unit,
Which communicates to SCR power controllers 100 not smooth judgement according to CPU 200, and control SCR power controllers 100 are selected and simulation
Amount output module 202 is communicated with analogue signal.
Specifically, 201 corresponding port of communication module carries out double with digital quantity input given side mouth A+, B- of power controller
Work communicates.So as to for example, SCR power controllers 100 can be set performance number and feedback power value is exported to PLC devices
Communication module 201, so that the CPU 200 of PLC devices is judged to the communication conditions of SCR power controllers 100;The opposing party
Face, communication module 201 can be with to 100 output control signals of SCR power controllers or parameter signal etc..
SCR power controllers 100 also have two power ports D1, D2, external control power supply by two ports to
SCR power controllers 100 provide the power needed for its work.
Further, the PLC devices are also connected with host computer 40, and judge SCR power controllers 100 in its CPU 200
When communication is not smooth, alarm signal is sent to host computer 40;According to alarm signal, host computer 40 indicates that switch control unit is cut
Move work, so that SCR power controllers 100 are communicated with analogue signal with the analog output module 202 of the PLC devices,
Subsequently the analog output module 202 of the PLC devices can send the control signal of analog representation to SCR power controllers 100
Or parameter signal etc..In addition, this analog quantity communication mode is alternatively arranged as and the communication module 201 of the PLC devices between
Digital quantity communication mode alternative or alternative.
Further, relay 30 includes a coil 300, a normally opened contact 301, and 301 two ends of normally opened contact connect respectively
The input port switching X2 and common port M of SCR power controllers 100, the coil of 203 control relay of digital output module
300 on off operating mode, when normally opened contact 301 is opened, the communication module 201 of SCR power controllers 100 and the PLC devices is with number
Word signal communication, when normally opened contact 301 is closed, SCR power controllers 100 select the analog output module with the PLC devices
202 are communicated with analogue signal.
Wherein, specifically, using device ripe in prior art, which has multigroup configuration ginseng to SCR power controllers 100
Number, for example, digital quantity communication mode of first group of configuration parameter corresponding to SCR power controllers 100, i.e., in port A+, B-
Input signal is digital quantity;Analog quantity communication mode of second group of configuration parameter corresponding to SCR power controllers 100, in port
The input signal of AI 1, GND is 4-20mA.By the selection of configuration parameter, the logical of SCR power controllers 100 can be directly selected
Letter mode.In this embodiment of the invention, from TPA series single-phase IGCT power controllers.In input port switching X2 and public affairs
When holding M to disconnect altogether, SCR power controllers 100 enable first group of configuration parameter, connect with common port M in input port switching X2
When, SCR power controllers 100 enable second group of configuration parameter.
Relay 30 using conventional relays in prior art, its coil 300 it is electric after, normally opened contact 301 is closed, coil
After 300 dead electricity, normally opened contact 301 reverts to the off-state of acquiescence.Thus, relay is controlled by digital output module 203
30 coil 300 of device electric/power failure state, you can control normally opened contact 301 on/off state, and then select SCR Power Controls
The configuration parameter of device 100, finally realizes the switching to 100 communication mode of SCR power controllers.
The power controller communication mode automatic switchover system that the embodiment is provided, power controller and control PLC it
Between remain reliable communication, technique or plant issue that power controller communication does not freely cause can be prevented effectively from.The system
Simple structure, convenient, low cost of implementing, it is easy to utilize.
As shown in Fig. 2 second embodiment of the invention provides a kind of power controller communication mode automatic switching method, it is used for
Control power controller and the communication between the communication module and analog output module of a PLC devices, wherein, the PLC devices
Part also has parts of other possible needs such as CPU, digital output module, and the automatic switching method comprises the steps:
Step S10, under digital quantity communication mode, setting power value and feedback power value are exported to communication module;
Specifically, under default situations, power controller is communicated with digital quantity communication mode with external devices, and this meets
Current digital communication, numerically controlled technology trends.Here, power controller is set performance number and feedback power
The communication module of value output to outside PLC devices.
Step S11, the CPU of the PLC devices are according to the diversity judgement power controller of setting power value and feedback power value
Whether communicate not smooth;
Specifically, the CPU of the PLC devices calculates difference between setting power value and feedback power value and accounts for setting power value
Percentage ratio, if the absolute value of the percentage ratio of difference is more than the first percentage threshold, and the percentage ratio absolute value of difference more than the
The state of one percentage threshold remains not smooth more than after very first time threshold value, then judging that power controller communicates.
Further, it is preferable in the case of, the first percentage threshold is 3%, and very first time threshold value is 5 seconds.
If the CPU of step S12, the PLC devices judges power controller, and communication is not smooth, it indicates that a switch control unit is cut
Change the communication mode of power controller;
Specifically, in the case where judging that power controller communication is smooth, the CPU of the PLC devices can directly or via
One host computer, indicates the communication mode of switch control unit power switched controller immediately.The switch control unit can change
The configuration parameter of variable power control device, and then change the communication mode of power controller and external devices.
The switch unit can be for example by the digital output module of relay and the PLC devices with reference in first embodiment
Configure to realize.
Step S13, switch control unit switch over action, the communication mode of power controller is switched to analog quantity and is led to
Letter mode;
Specifically, the break-make between the input port switching X2 and common port M of switch control unit control power controller
State, when X2 and M disconnects, power controller adopts first group of configuration parameter, carries out digital quantity with the communication module of the PLC devices
Communication;When X2 is connected with M, power controller adopts second group of configuration parameter, carries out with the analog output module of the PLC devices
Analog quantity communicates.
The CPU of the PLC devices constantly detects the difference of power controller sets performance number and feedback power value, if this difference
The different larger and persistent period is longer, then judge that power controller communication is not smooth, and digital quantity communication mode that at this moment will be original is cut
Analog quantity communication mode is changed to, so as to maintain to continue unimpeded communication between power controller and control PLC, power is prevented effectively from
Technique or plant issue that controller communication does not freely cause.
Above-described only the preferred embodiments of the present invention, the embodiment are simultaneously not used to limit the patent of the present invention and protect
Shield scope, therefore the equivalent structure change made by every description and accompanying drawing content with the present invention, should be included in the same manner
In protection scope of the present invention.