Klaus

MrPLC Member
  • Content count

    23
  • Joined

  • Last visited

Everything posted by Klaus

  1. How set output by indirect command?

    Cut from the Step 7 manual A pointer is used to point to an address. The advantage of this type of addressing is that you can modify the address of the statement dynamically during program processing. Pointer for Memory-Indirect Addressing Program statements that work with memory-indirect addressing are made up of an instruction, an address identifier, and an offset (the offset must be given in square brackets). Example of a pointer in double word format: L P#8.7 Load the value of the pointer into accumulator 1. T MD2 Transfer the pointer to MD2. A I [MD2] Query the signal state at input bit I 8.7 and = Q [MD2] assign the signal state to output bit Q 8.7. Pointer for Area-Internal and Area-Crossing Addressing The program statements that work with these types of addressing are comprised of an instruction and the following parts: address identifier, address register identifier, offset. The address register (AR1/2) and the offset must be specified together in square brackets. Example for Area-Internal Addressing The pointer contains no indication of a memory area: L P#8.7 Load the value of the pointer into accumulator 1. LAR1 Load the pointer from accumulator 1 into AR1. A I [AR1, P#0.0] Query the signal state at input bit I 8.7 and = Q [AR1, P#1.1] assign the signal state to output bit Q 10.0. The offset 0.0 has no influence. Output 10.0 is calculated from 8.7 (AR1) plus the offset 1.1. The result is 10.0 and not 9.8, see pointer format. Example for Area-Crossing Addressing In area-crossing addressing the memory area is indicated in the pointer (in the example I and Q). L P# I8.7 Load the value of the pointer and the area identification in accumulator 1. LAR1 Load memory area I and the address 8.7 into AR1. L P# Q8.7 Load the value of the pointer and the area identification in accumulator 1. LAR2 Load memory area Q and the address 8.7 into AR2. A [AR1, P#0.0] Query the signal state at input bit I 8.7 and = [AR2, P#1.1] assign the signal state to output bit Q 10.0. The offset 0.0 has no influence. Output 10.0 is calculated from 8.7 (AR2) plus the offset 1.1. The result is 10.0 and not 9.8, see pointer format.
  2. OP17 Upload

    You probably have to set the op in transfer mode. This can be done in the "System settings" menu with "OpMode" if you integrated Siemens standard pictures or by holding in some key combination which i cant remember when you restart the op.
  3. Comparing two DataBlock in a PLC

    I wrote a bit of code hope this is what you are looking for. Remember that 100 Real value compares probably will add a little peak to the scan cycle time if this i critical you can spilt the comparision over more scancycles. CompareR.zip
  4. Siemens Training Manuals/CD

    I can really recomend this books by Hans Berger, Automating with SIMATIC and Automating with STEP 7 in LAD and FBD. They will give you a good grip of the Siemens Step7 controls. They are also avaliable in Step5 versions but iam not sure that there are English versions i have onle seen the German ones. Siemens have also gatherd a bit of material on their website Siemens material .
  5. Profibus DP with ABB inverter

    You can use sfc 14 to read data over the profibus and sfc15 to write data. Remeber that the Laddr adress is entered in hex format. So if you for example is using PIW/PQD 512 to communicate then the laddr should be 200.
  6. s7 lite help

    Fritz here are some links containg more information.......... Step7 Lite Siemens support Siemens mall
  7. s7 lite help

    Yes you can! Cut from siemens homepage. STEP7 Lite is designed for non-networked automation solutions. Typical applications are those with SIMATIC S7-300 in a centralized arrangement with digital and analog inputs/outputs. SIMATIC C7 and the intelligent probes of ET 200 S/X can also be programmed. LAD, CSF and STL are available as a programming standard. In terms of simulation and diagnostics there are no restrictions compared with STEP7. If the tasks should become more complex, you simply upgrade to STEP7. Your investment in the know-how is secure, as your data can be transferred.
  8. Programming PLC in delphi

    Runmode
  9. System Tray Icon

    Msconfig isent installed in win2000 but it will work if you copy it from ex a WinXP station. The task you are looking for is called "S7ubTstx.exe" and is started throw the registry. Start regedit and do a search for S7ubTstx. When you find a folder called run and a value with S7ubTstx just delete it.
  10. Siemens plc system

    Regarding the datatype support in Protool!
  11. Siemens plc system

    I litte tip. If you want to debug Functionblocks that are called more than one time first open the fc,fb or ob that calles the block that you want to monitor online. Then choose the menu debug and select test operation. Now you can right click on the fc or fb that you want to debug and choose called block --> Monitor with call up path. Now the fc,fb is monitored with the in/out parameters in the calling block. This nice feature dosent work with really old s7 cpu´s, there you have to write in the call up parameters yourself. Another tip if your project is getting big is to choose save as and click the "With reorganization" this can save plenty of disk space. And regarding the simatic Archive feature what it does i simply packing the project using standard archiving tools. Pkzip is predefined but you can change this to example winzip or arj in the Options/customize/archiving menu.
  12. Help. "Micro Computing" and Delphi

    Check out this links Vladimir Shishkov and Runmode there you can find information about Siemens 200 and Delphi!
  13. No Prodave cant be used. Prodave is used for communication between a pc and the mpi port on the cpu.
  14. Soft for S7-200

    Here you can download STEP 7-Micro/WIN 32 Evaluation Version This demonstration package has the complete functional scope of the normal product (for 60 days, you can use it up to 100 times). Microwin
  15. No i'm pretty sure that you cant use SFC14,15 FC1,2 they are for communicating with profibus slaves. I checked the cp that you mentioned not all the versions can handle S7 communication between them. Open Netpro and select the on of the cpu's and choose "insert new connection". Choose S7 communication and select the other Cpu as the communication partner if this dosent work choose the other cpu and try the same thing. If this works you can use any of this blocks to communicate UsendUSEND(SFB 8)/URCV(SFB 9) BSEND(SFB 12)/BRCV(SFB 13) PUT(SFB 15)/GET(SFB 14). If you are unlucky setting up the connection in Netpro try Siemens hotline and they can tell you if communication between your units is possible. I taught you always could do master/master communication but i might be wrong. I always succeded but i mostly work with 400 cpu's and they are better on communicating. If you manage to set up the connection i could point you in the right direction on how to use the blocks. Regarding communication to other Plc brands you could insert connection to unknown units in Netpro but then i think that both units have to suport standard profibus communication FMS or FDL but again im not sure since i never done this.
  16. Yes its possible. The easiest way is if you can use one of the cpu's as a slave.Then all you have to do is to insert the slave cpu in the masters Hwconfig. If you want to use master master communication it gets a little trickier. Then the first thing you have to do is set up a communication link in Netpro between the two units and the choose which communicationblocks you should use. Siemens has diffrent communication fb's "UsendUSEND(SFB 8)/URCV(SFB 9) BSEND(SFB 12)/BRCV(SFB 13) PUT(SFB 15)/GET(SFB 14)" read the helpfiles and see which is best for your aplication.
  17. Error message on tp 170a

    This means that the firmware in the Tp is to old to use with Protool 6.0. You can upgrade the firmware yourself. The new firware is provided on the Protool cd in the images catalog. There is also a tool callled PTUpdate that can be used to transfer the new firmware to the TP this can also be done from the download menu in Protool. But if you dont have the original program to download after then you have some trouble. I checked my old 5.2 disk and Prosave wasent included on the old versions so i think you need to get a copy of the original configuration. But i still have a strong feeling that i have seen older versions of Prosave check with Siemens maybe they can help you out.
  18. Resetting Data blocks to Zero

    Yes you got it completly right. I0.0_________________M100.0______M120.0 | |-------------------------------(P)--------------( ) M120.0 will be 1 for one scan cycle when I0.0 turns from 0 to 1. M100.0 is only there to keep track of when the input changes and cant be uses for something else. I0.0_________________M100.0______M120.0 | |-------------------------------(N)--------------( ) In this case M120.0 will be 1 for one scan cycle when I0.0 turns from 1 to 0.
  19. Resetting Data blocks to Zero

    No the correct way is to set the first scan bit in ob100 ob 101 and ob102 and then reset the bit at the end of ob1 after all your FB'FC calls. Use the set and reset function. The pulse and set bits are in the bitlogic catalog. If you cant see the catalogs choose menu "view" in the lad,fbd stl editor then check overviews.You can mark a coil or whatever and then press F1 to get help. Very usefull! The pulse function i Siemens is a litte diffrent comparded to Medoc. It uses a memory or a databit to see the diffrens between scans so it important not to use the memorybit as a pulse. Lad example OB100,101,102 Startup Ob's M250.0___M250.0 |/|----------(S) End of OB1 M250.0__ M250.0 | |----------( R) Pulsefunction condition that you_______Pulse_______Actual want to check_________Memory______Pulse | |-------------------------------(P)--------------( ) Actual Pulse memory will be 1 for one scan when condition turns to 1 (P) Positive puls (N) Negative puls
  20. Resetting Data blocks to Zero

    There is no bit that are 1 only the first scan. You have to make it on our own. Siemens Plc call startup ob's the first scan. Which Ob that is called depending on how the plc is reset. If you add Ob 100,101 and 102 you can set your bit there then reset the bit in ob1. Now you have created a bit that will only be 1 during the first scan of the plc. Regarding the resets of the data word if there is only a few words that you need to reset you can simply do like this. l 0 //Loads 0 into accu1 t db1.dbw 0 //transfers into word 0 t db1.dbw 2 t db1.dbw 4 and so on This can also be done i lad by using the move instruction. If you want to reset a lot of words you can create a loop and use the adressregister to reset your words. Another way is to use Systemfunction Fill and create a db with 0's and fill the other db with.If you have trouble with this let me know and i show you how its done.
  21. Help Moving Bits into Byte

    L p##BitIn //!!Almost missed the Bitin must be loaded as a pointer!!! l W [ar1.p#0.0] t #DBnumber OPN DB [#dbnumber] L D [AR1,P#2.0] LAR1 L B [AR1,P#0.0] T #ByteOut Not so much code right?? Stl is very powerful ones you get to know it. Me myself is a ladder guy but ladder cant do it all in a Siemens plc. You might think that this is wrong but look at any windows program in a dissambler and you will see similarity to Stl. This means when you code in stl you will get very efficient code. And efficient code means less cycle time. All your lad or fbd code will get compiled to stl code before being downloded to the plc. The best should probaly be to code all of the program i Stl but i think that its much easier to locate faults in the logic with the lad format. And i know for a fact that people with only basic knowledge of plc programming dont want to see Stl code when they open a project. As earlier members of this forum surely stated the Siemes manuals isent the best but i think they get better and better. But do you want to learn Stl buy a book by Hans Berger! Ive read these two Automating with STEP 7 in STL and SCL and Automating with STEP 7 in LAD and FBD and i can isure you they were worth every penny. Please forgive me for any grammar or spelling errors English is not my mother tongue.
  22. Help Moving Bits into Byte

    Here we go then...... Declare your lsb bit in as a a in variable in pointer format Declare your byte as a out byte variable Declare a tempvariable a dword i here call it DBnumber Hmmmm the pointer format is 6 bytes long how do we access it inside the fc since siemens only can handle 4 bytes a dword at the most We let the adressregisters help us Inside the fc call L #BitIn //Loads the information you entered at the BitIn bone in accumulator1 lar1 //Loads the accumulator1 in adressregister 1 Now we can access all the 6 bytes in the pointer. The first 2 bytes contains the dbnumber so remember if you want to move bits in a db the pointer in must be declared with the db number example db1.dbx5.5. You can write in errorhandeling in the fc but i wont do that here. You can ofcourse move any bits with this code Inputs outputs memory bits. If you are planning not to move dbbits you can remove that part of the code. l w [ar1.p#0.0] //Loads the first word of the pointer the dbnumber t #DBnumber //transfers to a dbnumber opn db [dbnumber] //Opens the db in the db register //This will work even if you dont move bits in a db The last 4 bytes contains your adress and your memory information L D [AR1,P#2.0] //Loads the information in adressregister1 LAR1 L B [AR1,P#0.0] // Loads a byte of whatever information you entered in the bit in pointer T #ByteOut //Moves to your byte
  23. All software programmers

    Protool comes in diffrent versions the regular one that is called just Protool is used to program hardware HMI´s like OP 7,17 Tp170 and so on. If you have ProtoolPro then you can program all siemens hardware hmi´s but you also get ProTool runtime that runs protool configurations on any regular pc with support for both Opc and Visualbasic scripts. Then there is Wincc that is Siemens most advanced SCADA. But in the near future WinCC Flexible will be released it combines WinCC with Protool so that you only will have to learn one software to program all newer hardware and pc configurations with one single program. A license for all WinCC and Protool runtime configurations is however required depending on how many "Powertags" you use in your system. A powertag is a variabel like a string or a word that you choose to display on your system. Alarms and messages are however not counted as powertags.