Question about Compilers & Programming Tools

3 Answers

S7 226 Siemen's Plc programming

Prob. 1) Is it possible to programme Input as output address output coil in rung.

2)How to copy ascii code ( comments)fr one prog to another .

Posted by on

3 Answers

  • Level 2:

    An expert who has achieved level 2 by getting 100 points


    An expert that got 5 achievements.

    Vice President:

    An expert whose answer got voted for 100 times.


    An expert whose answer got voted for 20 times.

  • Expert
  • 43 Answers

Hi there, you can check out this link Learn PLC programming.
This web site is great resource for anything you like about PLC programming, free programs for programmable logic controllers, and much much more about PLC programming basic

Posted on Aug 22, 2014

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

Can we do programming c++ programming for sms generation in s7-226/

Posted on Jul 22, 2013

  • Level 2:

    An expert who has achieved level 2 by getting 100 points


    An expert that got 5 achievements.


    An expert that has over 500 points.


    An expert who has answered 200 questions.

  • Expert
  • 326 Answers

Hello PLC'er,
No, input cannot be assigned to be an output. All outputs are designated as outputs in the ladder as coils, makes no differenca what the actual output is.

To copy lines fo code, use windows crtl-C, close ladder program--- not programmer-- and open other ladder program, use crtl-V.

Other method:
Save ladder in TXT format
Open ladder.TXT in notepad and then use the clipboard to copy between ladders.

Posted on Feb 08, 2008

Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

1 Answer

How to add in javascript?

var a=promt(“Enter first value to be added”);
a= parseInt(a);

var b=promt(“Enter second value to be added”);
b= parseInt(b);
var c = a+b;
alert (“Result is” +c);

May 11, 2010 | ArcMedia JavaScript Source Code 3000 Pro...

1 Answer

I want to have the source codes for printing diamond shape asterisk in visual basic

I am pretty sure I got this as a homework assignment in programming class. If I had someone give it to me then I wouldn't be even the limited programmer I am now. That said, I will help, but I will not give you the full out answer.

  1. The number of stars and characters per line are an odd number to make the ASCii look like a diamond. For my example, the maximum number of characters per line is five.
  2. Create a variable called dia_star that will hold the spaces and stars. To figure out the number of spaces that should be put into each star line, use this formula:
number of spaces per star = ( max number of characters per line - number of stars) / 2
dia star = number of lines before star and "*"
print dia star

  1. --*--
  2. -***-
  3. *****
Good Luck,


Jan 30, 2010 | Microsoft Visual Basic Enterprise Edition...

1 Answer

2 pass assembler in c

#include<stdio.h> #include<string.h> void main() { int lc; int s,num,f=0,f1,l,i,n=0; FILE *fp1,*fp2,*fp3; char lab[10],op[10],val[10]; char a[15][15]={{'S','T','A'},{'S','T','L'},{'L','D','A'},{'L','D','B'},{'J'},{'J','E','Q'},{'J','S','U','B'},{'C','O','M','P'},{'S','T','C','H'},{'R','E','S','W'},{'R','E','S','B'},{'W','O','R','D'},{'B','Y','T','E'}}; char b[20][10]; fp1=fopen("INPUT.DAT","r"); fp2=fopen("SYMTAB.DAT","w"); fp3=fopen("INTER.DAT","w"); fscanf(fp1,"%s\t%s",lab,op); if(strcmp(op,"START")==0) { fscanf(fp1,"%x",&lc); fprintf(fp3,"%x\t%s\t%s\t%x\n",lc,lab,op,lc); } s=lc; while(!feof(fp1)) { fscanf(fp1,"%s\t%s\t%s",lab,op,val); if(strcmp(op,"END")!=0) { for(i=0;i<13;i++) { if(strcmp(op,a[i])==0) { f1=0; break; } f1=1; } if(strcmp(lab,"$")!=0) { for(i=0;i<n;i++) { if(strcmp(lab,b[i])==0) { f=1; break; } f=0; } if(f==0) { fprintf(fp2,"%s\t%x\n",lab,lc); strcpy(b[n++],lab); } } fprintf(fp3,"%x\t%s\t%s\t%s\n",lc,lab,op,val); if(f==1) fprintf(fp3,"ERROR:SYMBOL ALREADY DEFINED\n"); if(f1==1) fprintf(fp3,"ERROR:WRONG OPCODE\n"); num=atoi(val); if(strcmp(op,"RESW")==0) lc=lc+(num*3); else if(strcmp(op,"RESB")==0) lc=lc+num; else if(strcmp(op,"BYTE")==0) { num=strlen(val)-3; lc=lc+num; } else if(strcmp(op,"WORD")==0) lc=lc+3; else lc=lc+3; } } fprintf(fp3,"%x\t%s\t%s\t%s\n",lc,lab,op,val); l=lc-s; fprintf(fp3,"PROGRAMLENGTH %x",l); fcloseall(); }

#include<stdio.h> #include<string.h> #define q 11//N0. of elements in array A void main() { int lc,ad,address,t=0; int s,num,l,i=0,j,n,len,ni=0; FILE *fp1,*fp2,*fp3; char lab[10],op[10],val[10],code[10]; char a[15][15]={"STA","STL","LDA","LDB","J","JEQ","JSUB","COMP","STCH","ADD","SUB"}; char b[20][15]={"14","32","03","69","34","30","48","28","24","16","0C"}; char sym[15][10]; int symadd[15]; fp1=fopen("INTER.DAT","r"); fp2=fopen("SYMTAB1.DAT","r"); fp3=fopen("OUTPUT.DAT","w"); fscanf(fp1,"%x\t%s\t%s\t%s",&ad,lab,op,val); while(strcmp(op,"END")!=0) { fscanf(fp1,"%x\t%s\t%s\t%s",&ad,lab,op,val); t++; } t--; fscanf(fp1,"%s%x",val,&len); fclose(fp1); fp1=fopen("INTER.DAT","r"); fscanf(fp1,"%x\t%s\t%s",&ad,lab,op); if(strcmp(op,"START")==0) { fscanf(fp1,"%x",&lc); fprintf(fp3,"H^%s^00%x^%x\n",lab,lc,len); fprintf(fp3,"T^00%x^",lc); if(t>10) { fprintf(fp3,"1E"); t=t-10; } else fprintf(fp3,"%x",t*3); } s=lc; while(!feof(fp2)) { fscanf(fp2,"%s\t%x",sym[i],&symadd[i]); i++; } n=i; while(!feof(fp1)) { fscanf(fp1,"%x\t%s\t%s\t%s",&ad,lab,op,val); if(strcmp(op,"END")!=0) { if(strcmp(op,"RESW")!=0&&strcmp(op,"RESB")!=0&&strcmp(op,"WORD")!=0) { if(strcmp(op,"BYTE")==0) { for(i=2,j=0;i<strlen(val)-1;i++) { code[j]=val[i]; j++; } code[j]='\0'; fprintf(fp3,"^%s",code); ni++; } else { for(i=0;i<q;i++) { if(strcmp(op,a[i])==0) { strcpy(code,b[i]); break; } } for(i=0;i<n;i++) { if(strcmp(val,sym[i])==0) { address=symadd[i]; break; } } if(ni<10) { fprintf(fp3,"^%s%x",code,address); ni++; } else { fprintf(fp3,"T^00%x^",lc); if(t>10) { fprintf(fp3,"1E"); t=t-10; } else fprintf(fp3,"%x",t*3); ni=0; } }
} } else break; } fprintf(fp3,"\nE^00%x",s); fcloseall(); }
instrutui 1.Copy all the contents into turboc3 2.Execute the "PASS1.C" program 3.Execute "PASS2.C" program Note:The output of "PASS1.C" is used as the input to "PASS2.C"

Nov 07, 2009 | Compilers & Programming Tools

2 Answers

C++ poker program


I suggest creating an Array of Cards (cardOne,cardTwo,etc. to five)

If you can enter them in one at a time, after declaring the array, assign the values to the array.

cin < cardOne; (Psuedo code by the way, hope you don't mind)

Afterwards, you'll have an array with 5 cards.

Declare what full houses, flushes, etc would require.
Use an if statement (If you don't mind lots of code) to compare the entered Array against possible hands.

I didn't necessarily give you any specific C++ code. However, if you Google C++ user input, you should find plenty of commands that may help you.

Good Luck

(And not sure about Linear search to be honest, you can use a Linear search, but if you did it the way I explained, you just have to compare hand to a series of conditionals.)

Sep 23, 2009 | Compilers & Programming Tools

1 Answer

I cannot load some programmes. I get an error 429 activex component message., Is there a free vista available to run over the top to fix any or all problems i might have on my system

cause : This issue can occur when DAO dynamic-link library (DLL) files are mismatched or when there are incorrect registry entries. This issue can also occur when there is a missing DAO design-time licensing key. This key is required by Microsoft Excel, but is not required by applications created with Visual Basic

Method 1 loadTOCNode(2, 'resolution');
  1. Click Start, and then click Run.
  2. In the Open box, type regsvr.exe.
  3. Re-register DAO350.dll.

    NOTE: You can obtain a copy of DAO350.dll at the following FTP address: To register DAO350.dll, follow these steps:

    1. Click Start, and then click Run.
    2. In the Open box, type Regsvr32.exe C:\progra~1\common~1\micros~1\dao\dao350.dll
    3. Click OK.
  4. Click Start, point to Settings, and then click Control Panel.
  5. Click Add/Remove Programs.
  6. Insert your Microsoft Office 97 CD, and then click Uninstall.
  7. Delete the DAO folder from the hard drive.
  8. Click Start, point to Settings, and then click Control Panel.
  9. Click Add/Remove Programs.
  10. Insert your Office 97 CD, and then click Install.
  11. Repeat steps 4 through 6 to uninstall Office 97.
  12. Click Start, and then click Run.
  13. In the Open box, type eraser97.exe. (This file is also available at
  14. Repeat steps 4 through 6.
  15. Repeat steps 8 through 10 to reinstall Office 97.
Please Rate Solution!

Sep 08, 2009 | Compilers & Programming Tools

1 Answer

Please Solve this C++ Program

Write a program to prompt the user to input several lines of input. A line of inputs is terminated by '*'. For each readline of input the program should output:(use pointer notation for the array) . The total # of words . The lenght of the longest word in the line At the end the program should output: . The total number of words read in all lines of input . The lenght of the longest word read in all lines of input

Jan 19, 2009 | Compilers & Programming Tools

1 Answer

Macro code for copying a range of cells from one Excell w/sheet t

You did not respond to my claification request. Here is some code that might help, it copies a selection of cells going down until an emty cell is found and across until an emty cell is found. This is form an earlier version of office but should comeclose to woring in 2007.

Sub copyrange()
' copyrange Macro
' Macro written by Royal 11/22/2008.

'save the return values
wksname = ActiveSheet.Name
returncell = ActiveCell.Address
searchfor = ActiveCell.Value

'go to first worksheet and find entered value (note this is a value serach)
findfor = "A1"
On Error Resume Next

findfor = Cells.Find(What:=searchfor, After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
If findfor = "A1" Then
erwks = ActiveSheet.Name
er = MsgBox("Search item not found on Worksheet" + erwks, , "Search Error")
Exit Sub
End If


'save this address and start searching for copy area boundaries
begcell = ActiveCell.Address
begcl = ActiveCell.Cells.Column
begri = ActiveCell.Cells.Row
'search amaximum of 1000 rows and 676 columns
endri = begri + 1000
endcl = 26 * 26
maxrow = 0
maxcol = 0

For col = Cells.Column To endcl
If Cells(begri, col) = "" Then
maxcol = col
col = endcl
ri = endri
ri = begri
End If
For ri = ri To (Cells.Row + 1000)
If Cells(ri, col) = "" Then
If ri > maxrow Then
maxrow = ri
End If
ri = endri
End If
Next ri
Next col

maxrow = maxrow - 1
maxcol = maxcol - 1

'copy the selected area
endcell = Cells(maxrow, maxcol).Address
crnge = begcell & ":" & endcell
'go back and paste it in
' use this if yo want to paste formulas etc.
' use this code if you want to paste values instead of formulas etc.
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Nov 20, 2008 | Compilers & Programming Tools

1 Answer


I wrote this as a vbscript. It's Visual Basic code in windows script. If you have XP, just copy the text into notepad and save it as "vowel.vbs". Now double click the newly created script file.

' vowel.vbs
' This VBScript is used to count the vowels and consonants in a string.
' Designed and Tested on Windows XP Pro SP2
' Version 1.0.0 - 02.20.2008
' This code may be freely distributed or modified.
' -----------------------------------------------------------------'

Option Explicit
Dim str
Dim vowels
Dim consonants
Dim i

vowels = 0
consonants = 0
str = "hello"

for i = 1 to len(str)
select case mid(str,i,1)
case "a"
vowels = vowels + 1
case "e"
vowels = vowels + 1
case "i"
vowels = vowels + 1
case "o"
vowels = vowels + 1
case "u"
vowels = vowels + 1
case else
consonants = consonants + 1
end select

msgbox "Vowels = " & vowels
msgbox "Consonants = " & consonants
'End of script.

Feb 21, 2008 | Compilers & Programming Tools

1 Answer

LM90 ( LOGIC MAster ) communication with 90-30 series

Try "COMx 9600,E,8,1"
LM90 is a DOS package. I assume you are using DOS 6.xx to use program. Windows will not allow DOS program to access com ports. Use a VB, C++, etc to access PLC. Be very creative in programming... convert ladder instruction to HEX with checksums.

Good Luck.

Jan 11, 2008 | Compilers & Programming Tools

Not finding what you are looking for?
Compilers & Programming Tools Logo

Related Topics:

521 people viewed this question

Ask a Question

Usually answered in minutes!

Top Compilers & Programming Tools Experts

Robin Hill
Robin Hill

Level 3 Expert

1251 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18297 Answers


Level 3 Expert

733 Answers

Are you a Compiler and Programming Tool Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides