Siemens Step-7 Namur NE43 analog input.
Siemens S7-300 does not come standard with Namur NE43 functionality on analog inputs. For one of our projects we created a block to evaluate sensor status according Namur NE43. In this configuration the SM331 analog input modules is used in 2-wire configuration. And the Namur NE43 capable temperature and pressure transmitters are connected to the analog inputs.
Because the block below is called from the main program, the block need to have a call for every analog input channel. In every call, the input is specified, as well as the range of the transmitter connected. Also the high and low alarm threshold need to be specified. And these figures are taken from a Data-block. The data-block can be edited by means of the HMI device connected to the PLC. In the block the raw value from the Analog to Digital converter is calculated to a real value. This represents the measured temperature or pressure and is displayed on the HMI device. The alarm values are also specified as real values.
FUNCTION "ANALOG_INPUT" : VOID TITLE = //Function for evaluating analog inputs including Namur NE43. VERSION : 0.1 VAR_INPUT Input : WORD ; //PIW from analog input card LowVal : REAL ; //Low value for range calculation. HighVal : REAL ; //High Value for range calculation LowAlarm : REAL ; //Low alarm threshold HighAlarm : REAL ; //High alarm threshold EnableHighAl : BOOL ; //Enable high alarm (Set TRUE to enable) EnableLowAl : BOOL ; //Enable Low alarm bit (Set TRUE to enable) END_VAR VAR_OUTPUT Value : REAL ; //Sensor signal in engineering units. AlarmHigh : BOOL ; //High Alarm bit AlarmLow : BOOL ; //Low alarm bit Overrange : BOOL ; //Namur NE43 sensor fault Overrange Underrange : BOOL ; //Namur NE43 sensor fault Underrange END_VAR VAR_TEMP InReal : REAL ; Range : REAL ; Factor : REAL ; END_VAR BEGIN NETWORK TITLE =Namur NE43 low alarm //Value for evaluation Namur NE43 low = underrange //3,6 mA = -691 = FD4D L #Input; L -691; <I ; = #Underrange; NETWORK TITLE =Namur NE43 high alarm //Value for evaluating Namur NE43 high = overrange //21,5 mA == 7620 = 30240 L #Input; L 30240; >I ; = #Overrange; NETWORK TITLE = Conversion PeripheralInputWord (PIW) to real L #Input; ITD ; //Integer to Double conversion. DTR ; //Double to real conversion T #InReal; NETWORK TITLE =Calculation of range according high/low engineering units L #HighVal; L #LowVal; -R ; T #Range; NETWORK TITLE =Calculation of range multiplication factor //Max input analog is hex 6C00 => 27648 dec L #Range; L 2.764800e+004; /R ; T #Factor; NETWORK TITLE =Calculation of real value analog input in engineering units L #InReal; L #Factor; *R ; L #LowVal; +R ; T #Value; NETWORK TITLE = Low Alarm A( ; L #Value; L #LowAlarm; <R ; ) ; A #EnableLowAl; = #AlarmLow; NETWORK TITLE =High Alarm A( ; L #Value; L #HighAlarm; >R ; ) ; A #EnableHighAl; = #AlarmHigh; END_FUNCTION
For testing purposes we are using the DIVIZE A2007E-X 4-20 mA simulator. This unit made testing the configuration really a piece of cake. We dihave completed testing in our workshop with all inputs connected to the 4-20 mA simulators. Because of this test commissioning was fast and flawless.
The code is Step-7 source code, use at your own risc.
2 Responses to "Siemens Step-7 Namur NE43 analog input."
Rockwell Allen-Bradley 2080-IF4
Hi, we make use of the Rockwell Allen-Bradley 2080-IF4 analog input module. It seems we can not detect current above the 20 mA limit. Can we still use this with Namur NE43 type temperature transmitters? Please help us to find a solution so we can write software to react to the Namur NE43 error conditions as induced by the connected temperature sensors.
Thanks.
Hi, Check how the temperature transmitter reacts to a failure, maybe the reaction over/undercurrent is programmable? If the temperature sensor sets the current lower then 4 mA, there is no problem. You can evaluate the Namur NE43 error condition in your software. When the transmitter sets the current higher then 20 mA you might have a problem. I think the Rockwell 2080-IF4 module is capable of measuring the higher current. Read the manual or perform a quick test. You can use a 4-20 mA simulator with Namur NE43 current range and test how the PLC reacts when the current is above 20 mA.
Succes.