Problem configuring reports in WinCC

B

Thread Starter

BJOHN

I am facing few problems with WinCC report generator.

1. With reports configured for digital tags, The status that i am getting for a device for its on/ off conditions are in form of 0/1 in WinCC reports. How do i configure this so that reports would show me different interpretations of 0/1 ie ON/OFF, Run/Stop, Normal/ Abnormal etc.? The same thing is seen with alarm application where in as current status i am getting 0/1 states instead of which i need On/Off.

2. How do i configure Online Reports for alarm conditions, ie. a message string printed on a printer as soon as a alarm is reported??

Thanks
 
M

Mark Oldfield

<P>The only way I can see how to do this is by writing a quick dirty block in the PLC which converts your boolean into a string then point the report tag at QSTR. I made the strings inputs so you can use them for 1=ON or 1=FAULT etc from the CFC chart. Obviously you'll need to change the FB number to suit your memory map!</P>

<PRE>
FUNCTION_BLOCK FB802

{S7_m_c := 'true'; S7_blockview := 'big'}

VAR_INPUT
IN: BOOL; //Boolean value
STR_0: STRING[16]; //String value for 0
STR_1: STRING[16]; //String value for 1
END_VAR

VAR_OUTPUT
QSTR {S7_m_c := 'true'}: STRING[16]; //Output message
END_VAR


BEGIN

IF IN THEN
QSTR:= STR_1;
ELSE
QSTR:= STR_0;
END_IF;

END_FUNCTION_BLOCK
</PRE>

<P>Hope this helps!</P>
 
Top