<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ibhsoftec.com/en/index.php?action=history&amp;feed=atom&amp;title=S7-PCI315%3ARead_State</id>
	<title>S7-PCI315:Read State - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ibhsoftec.com/en/index.php?action=history&amp;feed=atom&amp;title=S7-PCI315%3ARead_State"/>
	<link rel="alternate" type="text/html" href="https://wiki.ibhsoftec.com/en/index.php?title=S7-PCI315:Read_State&amp;action=history"/>
	<updated>2026-05-14T12:56:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.ibhsoftec.com/en/index.php?title=S7-PCI315:Read_State&amp;diff=668&amp;oldid=prev</id>
		<title>Jonas: Created page with &quot; == Read current state with SFC1011 ==  The state of the internal battery of &#039;&#039;S7-PCI315&#039;&#039;, the existence of a SD card and the current power source can be read with a special ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ibhsoftec.com/en/index.php?title=S7-PCI315:Read_State&amp;diff=668&amp;oldid=prev"/>
		<updated>2012-08-06T12:33:23Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == Read current state with SFC1011 ==  The state of the internal battery of &amp;#039;&amp;#039;S7-PCI315&amp;#039;&amp;#039;, the existence of a SD card and the current power source can be read with a special ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Read current state with SFC1011 ==&lt;br /&gt;
&lt;br /&gt;
The state of the internal battery of &amp;#039;&amp;#039;S7-PCI315&amp;#039;&amp;#039;, the existence of a SD card and the current power source can be read with a special SFC. A Library for STEP®7 can be found in the installation folder.&lt;br /&gt;
&lt;br /&gt;
== Read State SFC ==&lt;br /&gt;
&lt;br /&gt;
CALL      SFC 1011&lt;br /&gt;
{| &lt;br /&gt;
|style=&amp;quot;width: 9em&amp;quot;|ENABLE_ADC ||style=&amp;quot;width: 7em&amp;quot;| := TRUE ||style=&amp;quot;width: 14em&amp;quot;| //INPUT BOOL&lt;br /&gt;
|-&lt;br /&gt;
|RET_VAL || := MW 0 || //RESULT INT&lt;br /&gt;
|-&lt;br /&gt;
|STATUS  || := MW 2  || //OUTPUT WORD&lt;br /&gt;
|-&lt;br /&gt;
|VOLTAGE  || := MW 4  || //OUTPUT WORD&lt;br /&gt;
|-&lt;br /&gt;
|SERIAL_NUMBER || := MD 6  || //OUTPUT DWORD&lt;br /&gt;
|-&lt;br /&gt;
|DEVICE_NUMBER || := MD 10 || //OUTPUT DWORD&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Parameter !! Type of data !! Description&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width: 9em&amp;quot;|ENABLE_ADC ||style=&amp;quot;width: 7em&amp;quot;| BOOL ||style=&amp;quot;width: 45em&amp;quot;| Start of battery voltage measurement with a positive edge. The measurement should not be done too frequently, because every measurement requires a litte amount of energy from the battery.&lt;br /&gt;
|-&lt;br /&gt;
|RET_VAL || INT || Always 0&lt;br /&gt;
|-&lt;br /&gt;
|STATUS  || WORD  || Bit 0 = 1 if Micro-SD card is inserted&amp;lt;br /&amp;gt;Bit 1 = 1 if the PLC has been started without program&amp;lt;br /&amp;gt;Bit 2 = 1 if the PLC program has been loaded from the battery buffered SRAM&amp;lt;br /&amp;gt;Bit 3 = 1 if the PLC programm has been loaded from internal flash&amp;lt;br /&amp;gt;Bit 4 = 1 if the PLC programm has been loaded from the Micro-SD card&amp;lt;br /&amp;gt;Bit 5 = 1 if power supply from the PC is detected&amp;lt;br /&amp;gt;Bit 6 = 1 if an external 24V power supply is detected&amp;lt;br /&amp;gt;Bit 7 = 1 if the PCI bus is active&amp;lt;br /&amp;gt;Bit 8 = 1 if battery voltage measurement is completed&lt;br /&gt;
|-&lt;br /&gt;
|VOLTAGE  || WORD  || Analog value of battery voltage, valid for one cycle when the measurement has been completed&lt;br /&gt;
|-&lt;br /&gt;
|SERIAL_NUMBER || DWORD  || Serial number of the card&lt;br /&gt;
|-&lt;br /&gt;
|DEVICE_NUMBER || DWORD || Order number of the card&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Status word==&lt;br /&gt;
If successful the BR of the status word is set, OR, STA and /FC are zero.&lt;br /&gt;
&lt;br /&gt;
If failed the BR, OR, STA and /FC of the status word are zero.&lt;/div&gt;</summary>
		<author><name>Jonas</name></author>
	</entry>
</feed>