S7 & Visual C#

I would say the answer is NO.
If you develop a program that complies your program code into siemens source or machine code then it would work.


You can program M7 prosessors with the C-language

PS.
Who would wan´t to use C-language to program a PLC ?
 
About C#

Thanxs for your answer, nif...and i want to ask this question

Why isn't a program that complies my program code into siemens source developed by C#?
 
Propably the new versions of STEP7 are, the older ones where made with visualbasic, was slow and required alot of memory.

If you make source code you will have to complile it with the siemens program before you can download it to the PLC.

The source code in it self very easy, you can write it with eg. notepad.

here is example:
FUNCTION "analogOutputcorrFC" : VOID
TITLE =Analog output handling
AUTHOR : NEF
FAMILY :
NAME : AO
VERSION : 1.1


VAR_INPUT
fOut : REAL ; //Output value in engineering units
fMinValue : REAL ; //Scaling minimum value corresponding 0 V
fMaxValue : REAL ; //Scaling maximum value corresponding nominal voltage
bMode : BOOL ; //Locking, i.e. enable simulation mode
fCorr1 : REAL ; //Correction value 1 =Y
fCorr2 : REAL ; //Correction value 2 =X
END_VAR
VAR_OUTPUT
nPQW : WORD ; //PQW address where the AO is written
END_VAR
VAR_IN_OUT
fWork : REAL ; //Work value required for AO locking
END_VAR
VAR_TEMP
fOutTmp : REAL ; //Output value before limits
END_VAR
BEGIN
NETWORK
TITLE =SCL network
//compiled by SCL compiler version: SCL K4.0.1 (K4.0.9.3)
SET ;
SAVE ;
= L 4.1;
A #bMode;
NOT ;
JCN A7d0;
L #fOut;
T #fWork;
A7d0: L #fWork;
L #fMinValue;
-R ;
L 2.764800e+004;
*R ;
L #fMaxValue;
TAK ;
T LD 6;
TAK ;
L #fMinValue;
-R ;
L LD 6;
TAK ;
/R ;
T #fOutTmp;
L #fCorr1;
*R ;
L #fCorr2;
+R ;
T #fOutTmp;
L 3.251100e+004;
>R ;
JCN A7d1;
T #fOutTmp;
JU A7d3;
A7d1: L #fOutTmp;
L -3.251200e+004;
<R ;
JCN A7d3;
T #fOutTmp;
A7d3: L #fOutTmp;
RND ;
T #nPQW;
CLR ;
A L 4.1;
SAVE ;
BE ;
END_FUNCTION
 
You can program S7 PLCs in the SCL language which is pascal like.
S7 SCL conforms to the IEC 1131-3 "Structured Text" format.
It is the closest you will get to C or C# on the S7.
 

Similar Topics

I am having difficulty finding documentation or examples on integrating Visual Studio with iX Developer in order to develop custom objects...
Replies
0
Views
535
I just received the Panelview plus 7 performance series B. When I put my .mer file on the series B, the text quality is way worse than the series...
Replies
7
Views
2,350
Hello, I am working on a project currently that uses a windows application on a PC to communicate with an NX1P2 controller to read and write...
Replies
2
Views
990
Hi I'm currently doing a college course in robotics and automation and a question we were asked was. A software application used by production...
Replies
10
Views
3,640
Wizards, I have an application that is built in Visual Studio 2019. I have been getting an error from the program that is very generic. The...
Replies
20
Views
3,950
Back
Top Bottom