EirikV

MrPLC Member
  • Content count

    44
  • Joined

  • Last visited

Everything posted by EirikV

  1. Writing to a MySQL readable database with S7-300

    Takk Jesper. I will investigate this further. I just wanted to make sure wether is was possible to do or not in Siemens. - Eirik
  2. Writing to a MySQL readable database with S7-300

    Hi Jesper. I can quote the specs: "The alarm system shall write alarms into a db file. This file shall be readable from MySQL applications. This file is to be accessible for <Company> distributed alarm system where <Company> uses a system developed using MySQL applications for distribution of alarm systems and for issuing of alarms through a pager system. File format and structure to be defined in cooperation with <Company>". To me this sounds like they want me to write some kind of file that they can aquire from my system. I could of course just use DBs.
  3. Writing to a MySQL readable database with S7-300

    It looks like I can use a delimited text file and just transfer that to the SCADA system via ethernet. My question then is: can I save a text file in the PLC memory?
  4. Writing to a MySQL readable database with S7-300

    Hi Nathan. I have not quite figured that out yet, but I guess I have to be sending some kind of user ID from the operator panel when a new user logs in. Regarding using a computer, the equipment is allready ordered and I'm just trying to implement the functionality given in the specs from the customer. We are on a tight budget and fairly late in the design stage now, too, so adding new hardware is probably out of the question. This is not a very big application, though, so I would think I should be able to get the functionality I want out if the current hardware. In the specs they say that it should write the alarm log to a database file that is readable for their SCADA system. I have no idea how their system works, my job is just to make sure there is a file with alarm logs that they can aquire from the system if they want to. I will look into the OPC utillities as you mentioned, though.
  5. Writing to a MySQL readable database with S7-300

    Hi again Jesper. The solution with a panel, was my initial idea to accomplish this, but I'm under the impression that my panel (TP 177B) is not capable of doing such. I may very well be wrong, though, but I found the panel very limited with regards to scripting and alarm logging, and even basic functionality too, really. I don't know if you are familiar with those panels. SQL should be very well documented, though, so I think I should be able to figure that out. My biggest concern is the Siemens side, since I'm not experienced with that at all. I guess I'll be busy this weekend then
  6. Hi, I have a S7 CPU-315-PN/DP that I am trying to get to communicate with a TP177B DP/PN touch panel via a CP343-1 ethernet module. I have assigned IP adresses 10.1.8.40 to the PLC and 10.1.8.41 to the touch panel. I have set those IPs in both WinCC flexible and in NetPro. There is no communication, though, between the panel and the PLC. When i run the special diagnostics for the Ethernet module, under 'Operating Mode' it reads: S7 communication Run OK Send/Recv Stop not configured System connection Stop The task has not started One thing, though. I have SIMATIC Manager version 5.4 + SP1, and in my HW config I can't find my exact Ethernet model 6GK7343-1EX21-0XE0 version 1.2, I can only find v1.1. Is this a problem? Appreciate your time - Eirik
  7. CP343-1 Comm via Ethernet to TP177B DP/PN

    Hei igjen! I changed the slot number to 2, and it cured the problem instantly. I had set the slot to 4, because that was what the hardware configuration told me. Do you know why the slot always is 2? Takker så mye for hjelpen! Mvh Eirik
  8. CP343-1 Comm via Ethernet to TP177B DP/PN

    Hello again Jesper! No, I actually have a 315-2 DP CPU. Sorry about that. I have connected them through a switch. I can ping both from my PC and I can ping the PLC from the Panel. I think I presented the problem the wrong way. The problem is really that the panel doesn't pick up data from the data block (DB) adresses I have specified. There is no change on the panel when bits/words change in the PLC. My software setup is a bit of a mess. I have WinCC flexible 2007 that came with my panel on one PC, whereas on my Field PG I have WinCC 2005. On WCC 2005 I can't find the correct unit version in the device setup. I couldn't locate any updates for it either on the net. On the PC which I have WCC 2007 I only have version 5.3 of SIMATIC manager, and so even with a hardware update, I couldn't find the correct version of the Ethernet module. I can, though on the Field PG which has v5.4 installed. The integration of WinCC flex 2007 into SIMATIC manager is not working since it is such an old version. You may wonder why I did not install WCC on the field PG. The reason is that the installation program wanted to remove the old version, and the customer I have, wants the software (WinCC) delivered with the system. That basically means that I'm stuck without a license since I have no clue where the CD for WinCC 2005 is. But if you mean that the S7 PLC and the TP absolutely should be integrated into the same STEP7 project, I will give it a shot anyway. I tried doing the integration with WinCC 2005 and it kind of worked, but it complained about the device "Not being connected", though it was conneted via Ethernet. And it also complained with this message: "Not all components are downloaded. If S7RTM is installed, set the option "S7RTM is installed" in the "Object Properties" of PC station SIMATIC HMI Station(1), in the "Configuration" tab. You will then be able to download all components." When i tried to download the settings. I can't find the "Configuration" tab, nor do I know what S7RTM is or wether it's installed or not. - Eirik
  9. Hi, Is it not possible to create faceplates or scripts with a 'TP 177B color PN/DP' sceen? All the relevant menu items are greyed out... - Eirik
  10. S7 LAD/STL/FBD editor converts FBD into STL

    Here :) A( AN DB100.DBX 1.5 AN DB100.DBX 1.6 AN DB100.DBX 1.7 AN DB100.DBX 2.0 A DB100.DBX 0.3 AN DB21.DBX 0.6 O DB100.DBX 0.4 ) L S5T#4S SD T 12 A( AN DB100.DBX 0.3 AN DB100.DBX 0.4 O DB21.DBX 0.6 ) R T 12 NOP 0 NOP 0 A T 12 = L 0.0 AN DB21.DBX 0.6 A( O DB100.DBX 0.3 O DB100.DBX 0.4 ) A( O DB30.DBX 0.4 O L 0.0 ) L S5T#1S SD T 13 A( AN DB100.DBX 0.3 AN DB100.DBX 0.4 O DB21.DBX 0.6 ) R T 13 NOP 0 NOP 0 A T 13 = L 0.1 O DB100.DBX 1.5 O DB100.DBX 1.6 O DB100.DBX 1.7 O DB100.DBX 2.0 O O L 0.1 O A DB30.DBX 0.4 AN DB100.DBX 0.3 AN DB100.DBX 0.4 R DB21.DBX 0.5 A L 0.1 BLD 102 S DB21.DBX 0.6 A L 0.0 FP DB301.DBX 0.2 JNB _001 L DB101.DBW 12 L DB101.DBW 2 +I T DB101.DBW 12 _001: NOP 0
  11. S7 LAD/STL/FBD editor converts FBD into STL

    Hi, Here is one of the networks: A( AN "Internal Signals".IL_HVZS_S16 AN "Internal Signals".IL_HVZS_S17 AN "Internal Signals".IL_LZSLL_S18 AN "Internal Signals".IL_TZSHH_S18 A "Internal Signals".SR_CR_SEQ AN "N2 Out".Y1B O "Internal Signals".SR_CR_SEQ2 ) L S5T#4S SD T 12 A( AN "Internal Signals".SR_CR_SEQ AN "Internal Signals".SR_CR_SEQ2 O "N2 Out".Y1B ) R T 12 NOP 0 NOP 0 A T 12 = L 0.0 AN "N2 Out".Y1B A( O "Internal Signals".SR_CR_SEQ O "Internal Signals".SR_CR_SEQ2 ) A( O "N3 In".S4 O L 0.0 ) L S5T#1S SD T 13 A( AN "Internal Signals".SR_CR_SEQ AN "Internal Signals".SR_CR_SEQ2 O "N2 Out".Y1B ) R T 13 NOP 0 NOP 0 A T 13 = L 0.1 O "Internal Signals".IL_HVZS_S16 O "Internal Signals".IL_HVZS_S17 O "Internal Signals".IL_LZSLL_S18 O "Internal Signals".IL_TZSHH_S18 O O L 0.1 O A "N3 In".S4 AN "Internal Signals".SR_CR_SEQ AN "Internal Signals".SR_CR_SEQ2 R "N2 Out".Y1A A L 0.1 BLD 102 S "N2 Out".Y1B A L 0.0 FP "Alarm Data".P_NO_S4 JNB _001 L "Internal Data".VAR_NO_S4 L "Internal Data".CNS_1 +I T "Internal Data".VAR_NO_S4 _001: NOP 0
  12. S7 LAD/STL/FBD editor converts FBD into STL

    Thanks for your reply. I tried that, but it didn't cure the problem. The problem is only with two networks out of 14 (in the same FC). I created them all in FBD, but two of them suddenly is STL. I could mention, though, that it happened after I did some simulating. Didn't think that should make a difference, though...
  13. Hi guys, I'm struggling here with a Omron CPM1A-40CDR-A trying to do something that I'm pretty sure it isn't ment to be able to do, but here it goes. I have 16-bit register that get a value between $00 and $FF fed into it from a MAD01 Analouge module. I'm scaling it down to $00 - $C8 (0 - 200) using the built in scale function. Oh, wait! There is no built in scale function! :-P Anyway, now I want to write a routine that allocates an array of 16-bit registers and does the following: Write the start value ($00 - $C8) into the first register and then subtract $01 from the value, then move the result into the next register and repeat the action until it's done a 199 times. Then I want to scale the results between $00 and $FF again (well, I could maybe just forget the scaling in the first place, and just work with the original values, makes no difference really. It's just a little bit easier to work with). Now I want to move the value of the first register to the MAD01 analouge output, and when a certain event occur I want to move the value of the next register to the analouge output. This I want to do 200 times (until I reach $01). I could write the whole thing by hand, but that is to say the least; a bit tideous. Is it possible to do this in a Omron CPM1A-40CDR-A? Is there some hidden adress pointer or similar that I could use? I found a COLL(81) instruction that may be usable, but I see it wants me to tell it what to do by using BCD, and I absolutley can't stand BCD! Anyway, thanks for any suggestions! - Eirik
  14. Another unexplainable phenomenon has occured Look at the following capture. When the increasing word reaches +25 it starts on +21 again, and when the decreasing word reaches +19 it starts on +23 again. Why is this? Am I mixing binary and BCD?
  15. Hehe, to your first question: Well it's probably a bit of both. I've done some 68k assembly, so it's probably from there i picked the terminologys, but I can't say I'm very experienced with either that or PLC programming. I do know the Omron terminology too Second Q: Yes, basically that. There are some scaling involved before and after, but in essence that is what I'm trying to achive. After the values are calculated, they will be moved to the analouge output. The signal out is proportional to the tension applied to a cable coil on a drawing machine. I want to decrease the tension so the tension stays more or less constant as the coil emptys. This I will do with a high speed counter connected to the PLC, which give me 60PPR. With a certain interval I will move the next tension value to the output. The particle clutch applying the tension applies 0 - 200 Nm of braking torque proportional to a 0 - 10 V signal from the PLC. If I start out at 200 I will of course reach 0 later then if I start out at 18, but if I reach 0, I want to apply a constant value of 1 to the output. The start tension can be adjusted by a potmeter in 10 steps. So it is from the start tension specified by the potmeter I will start decreasing. Third Q: I have attached a part of the program where I check if the start tension has changed and call the subroutine. Now the part where I check for changes in start tension works all fine and dandy, but, when the subroutine executes, it's only semi-working. On the first scan I set the adress pointer (DM19) to #14 (DM20). Now the start tension from previous scan (DM15) is AFAIK #0, so the start tension routine is executed (once). The DM13 register contains +18, which is correct, and DM16 contains +17, which is also correct. DM19 (pointer) however, still contains +20, and DM20 is not written to. If I now change the start tension to 255 (199 scaled in DM13) the adress pointer (DM19) is increased to +21 and the decrement data register (DM16) still contains +199. If I now set the input to 0 again, +18 is written to DM13 and DM16, DM16 is decreased to +17 and DM19 is increased to +22. Still none of the registers the address pointer has pointed to gets data written to them. I am having a bit of a hard time understanding exactly why this happens. Probably me messing something up, but I don't exactly see what at the moment. Hope you can shed some light on that. Now, I'll try doing what you suggested. After all it is not nesecary to pre-calculate all the values Thanks Eirik
  16. I've tried to do that, but it seems as if the cycles are too quick for i.e the CMP, CNT, and even MOV instruction to react to anything. It may be just bad coding from me... I'm not the one who bought this antique PLC I was just asked to do some of the work. If nothing works, I could propose to buy a newer one, but for now I will see if I can get the sucker to obey I have another Q here; can I use the JMP instruction inside a subroutine to make it loop itself?
  17. Is there an easy way to loop a subroutine a certain number of times in the CPM1A?
  18. @gtsuport Thanks! I'll look into it @IO_Rack I'll have a look, thanks
  19. @beegee Ah! So indirect adressing is possible. Never thought of trying that Thanks!