pete3589

MrPLC Member
  • Content count

    43
  • Joined

  • Last visited

Community Reputation

0 Neutral

About pete3589

  • Rank
    Sparky

Contact Methods

  • ICQ 0
  1. S5Time Math functions

    I dont understand how you are able to simply subtract the first 2 S5T numbers. Granted I dont use STL (mostly LAD), but the main problem was that I cannot subtract the S5T values using a SUB_I function in Ladder. Would I be able to do this in STL? (sorry I dont have S7 in front of me to test this out)
  2. S5Time Math functions

    I have a progam where I need to find the time remaining in a timer and move it to a new timer input. Basically all I need to do is take the preset time, and subrtract it from the remaining time to get this, and then move the result to the new timer. I cant simply take the value and use an integer subraction of the two values (or at least it wont work for me) cause i get a type conflict in my Subtraction block. Strangely I was able to save this block before with S5T values in the SUB_I block, but after adding a Positive edge trigger to the particular network, it will not save. I guess my question is, is there a way to add or subtract words that are S5T's and get the result in a S5T? Ex. S5T#100ms - S5T#10ms = S5T#90MS
  3. Imbedded Variables in S7 SCL

    Here is an example of what I want to do. The system I am making is going to be a "standard" design and will be duplicated many times, so the hardware will always be the same but the Inputs to the various analog modules will differ, so I use an array that I will call "AnalogInputs.[x]" for each I/O. So AnalogInputs[1] might have a device connected to it, but AnalogInputs[2] may not, so I control whether the input will be On or Off in the array I created. The user can control this from the HMI. Now, if the input is off, I don't want to display it on my main taglist page. In order to do this, I check to see if each input is on or off in my analog array, if it is on, then I transfer all of the necessary data to my taglist display array, if it is not then I simply skip it. In RSLogix 5000 I did this like this. SIZE(AnalogInputs, 0, TagListSize); // Gets the size of my analog input array ii:=0; FOR i:=0 to (TagListSize-1) DO If (AnalogInputs[i].OnOff) Then // skip input if turned off TagListData[ii].Description.LEN := AnalogInputs[i].Description.LEN; // If "on" get the length of the text TagListData[ii].Units.LEN := AnalogInputs[i].Units.LEN; // based information TagListData[ii].TagNumber.LEN := AnalogInputs[i].TagNumber.LEN; cop(AnalogInputs[i].Description.DATA[0],TagListData[ii].Description.DATA[0],81); //then copy the data cop(AnalogInputs[i].Units.DATA[0],TagListData[ii].Units.DATA[0],81); // for the input name, cop(AnalogInputs[i].Tagnumber.DATA[0],TagListData[ii].Tagnumber.DATA[0],81); // units and tagnumber TagListData[ii].Value := AnalogInputs[i].RValue; // into the taglist data TagListData[ii].ChannelStatus := AnalogInputs[i].ChannelStatus; // array TagListData[ii].DataType := 0; ii:=ii+1; End_if; End_for; I am having a tough time duplicating something like the above code. It seems that every time I add my [x] that S7 has a problem and does not recognize it as a variable. Using the above code, let say this machine will only have devices connected to analog inputs 1, 3, and 7. What will happen is the analog input array will look like this AnalogInput[1] = On AnalogInput[2] = Off AnalogInput[3] = On AnalogInput[4] = Off AnalogInput[5] = Off AnalogInput[6] = Off AnalogInput[7] = On But the taglistdata array will now look like this TaglistData1 = AnalogInput[1] TaglistData2 = AnalogInput[3] TaglistData3 = AnalogInput[7] Now I will have HMI screens that display Taglistdata 1-x and will not display any inputs that are turned off. This way, the user can also add I/O, and turn it "on" from the HMI, and suddenly have a new input displayed on the HMI without having to do anything from the S7 software. The only reason why I do this is because the I/O will be changing, but the PLC is going to be a standard hardware design with a standard program that can be modified from the HMI to fit many different needs. This would of course be much easier if I had set I/O, but making the program flexible makes things much tougher.
  4. Imbedded Variables in S7 SCL

    That is true that I did not reset the alarm bit, but I would take care of that in another portion of the code. What bothers me is that when I talk about coding AnalogInputs[x].Rvalue, it seems that there is no way to do this in Siemens. I want to physically put the [x] in my code and then change the x value when I complete a scan. Is there no way to do this, or do I need to follow a certain syntax in order to get the x recognized as a variable or tag?
  5. Imbedded Variables in S7 SCL

    Thanks Jesper. I decided to do it the way you suggested where I simply use STL to transfer the data into the array that I need. You were also spot on with what I was planning on doing with the min and max spans. This is going to be user configurable from the HMI. The one concern I have is when I set up my alarm and trip code. Basically it will cycle through my arrays which will check to see if alarming is enabled, and then determine whether the input is above or below the user entered value. I will eventually have to use an imbedded variable and I am not sure how to do this. Basically it would be something like this FOR x = 0 to 95 DO IF "AnalogInputBlock".AnalogInputs[x].OnOff THEN // If the input is turned on IF "AnalogInputBlock".AnalogInputs[x].AlarmHighEn THEN // and if there is a high alarm value entered IF "AnalogInputBlock".AnalogInputs[x].AlarmHighValue < "AnalogInputBlock".AnalogInputs[x].Value" THEN // if the scaled value is higher than the alarm value "AnalogInputBlock".AnalogInputs[x].AlarmTrigger = 1 // set the channels alarm bit End_For etc etc. I am also noticing that not many people use SCL and most use STL? I guess my Pascal / C++ background makes that seem like a better option for me.
  6. Imbedded Variables in S7 SCL

    I am new to S7 programming and I come from primarily an AB RSLogix 5000 background. A good chunk of what I do involves using imbedded variables which were quite easy to use in RSLogix 5000 Structured text format. I was told to use SCL since it would be similar to AB structured text. Below is something I put together quickly. I basically want to put analog input module data into the Analog Input array I created. FUNCTION FC5 : INT // Temporary Variables VAR_TEMP i : INT; END_VAR CONST x := 400; END_CONST // Statement Section BEGIN FOR i = 0 TO 7 DO "AnalogInputBlock".AnalogInputs.PIDValue := PIW [x]; x := x+2; END_FOR; END_FUNCTION There are a whole bunch of errors in the above code, but basically I just need some garbage variables (x and i above) that increase by 1 and 2 to accomplish this and then have it loop. Am I headed in the right direction at all?
  7. Indirect Addressing Revisited

    I am also having a similar issue with Indirect addressing as described in this thread: http://forums.mrplc.com/index.php?showtopic=11766 Unfortunately, I come from an AB background and am very used to using imbedded variables (i.e. AnalogInput[x].Value) to perform many of my tasks. I need to move 3 tags from my AnalogInputs[x] array (there are 96 elements) to TaglistData[x] array but only if AnalogInputs[x].OnOff is on. I am pretty good with ladder logic, but I really don't understand STL language that well yet. In RSLogix 5000, the code would look something like this (in text) y=0 For x = 0 to 96 IF AnalogInputs[x].OnOff then TaglistData[y].Value =: AnalogInputs[x].Value .... .... y = y+1 end if end for; I have my arrays created in DB blocks. I am guessing I need to use the memory location in the DB for the first BOOL in question and then simply add the offset to the next BOOL and continue looping this until I check all of the available values I need. Or an easier way would be if I can use imbedded tags like in the above example, but I don't think Siemens has this capability. Any help would be appreciated.
  8. Interesting DDE Issue

    Thanks for the input, but Excel has issues with Import = DDEInitiate(DDE) (argument not valid) I think I may just leave it as a static value and will just have to make an effort to get everyone to use the same DDE topic for their projects. Like the new avatar as well TW
  9. Im making a DDE communication Excel spreadsheet that will upload and download tag values. Since several people at my company use different DDE topics I decided to make that a user configurable entry depending on what was used. The code looks like this: Dim DDE As Variant DDE = Worksheets("Set Points").Range("L4").Value Import = DDEInitiate("RSLinx", DDE) Where the entry for the DDE link is entered on the "Set Points" page in location L4. Interestingly, when I run I get a popup that gives me a list of DDE topics configured in my RSLinx (not all available, but a good amount) and asks me to pick the proper one, and then the code executes. Im curious why it wont just use the DDE link i enter in the cell? If i use Import = DDEInitiate("RSLinx", "TheTopicName") everything executes fine, so I dont understand why if i use a cell value it would create a problem. Any input would be appreciated.
  10. Panelview Plus Problems

    It is not the screen saver, that was my first thought as well, and I always turn it off for this exact reason. The thermometer inside the panel was my thought as well, however this is in russia, and i had a tough enough time getting some other basic things, so a thermometer might prove to be tough. I was more wondering if anyone had seen a problem like this caused by excessive heat.
  11. I just got back from a successful installation of a new system and about a week later the customer has informed me of this problem. Apparently the Panelview Plus 700 had suddenly gone dim. They could still see the values, but everything was quite dark. They powered off, and after cycling the power to the panel a few times the panelview came on at full brightness. The one concern I have is temperature. I recall the panel getting warm while the machine was running for some time (the panel is a large stainless steel panel with purge) and it is mounted near a large induction motor which it may pick up heat from. The specs on all panelviews say that they can run at 55ºC or 131ºF, and though the temperatures didnt approach this (i think) when I was there, would this be the result? If anyone has any input on this, or maybe has seen a panelview dim like this please share.
  12. I was recently talking to a local Rockwell rep and asked about future plans for the use of the Compact Flash slot in the CompactLogix line of processors. As most know, you can download a project to a CompactLogix processor from the flash card (by removing the battery, therefore erasing the program, and then starting back up with the card in the slot via corrupt memory). However, to the best of my knowledge, there is no way to save a file to flash without the use of Logix 5000. When the machines that my PLC's are on are started up, there is rarely a controls person there with software for uploading and downloading. For this reason, there are quite a few options that are changeable by the operator through the panelview, so no software is needed. The main program is given to the customer on flash in case they lose the program, however, many changes are usually made to the tags from the HMI by the tech that starts up the machine. These changes are not reflected on the flash since there is (to the best of my knowledge) no way to upload to compact flash without Logix 5000. If the program is lost, they are back to square one, and someone must reconfigure the program to their settings. Interestingly, the rep said there was a way to upload taglist information to the compact flash card without the use of Logix 5000 (i.e. something that could be programmed in, then accessed by a button on the HMI). Unfortunately, we never got back to the topic. Does anyone have any idea on how to do this? I would imagine it would involve GSV's and SSV's in such a way to activate the flash. Since it can be done via Logix 5000 (so we know the compact flash drive can read and write), i would imagine there must be some kind of series of commands that would allow a user to do this from the HMI. Any input would be appreciated.
  13. Control Logix Battery

    My applications often get shipped overseas by sea to asia since the PLC's are mounted on large machines. This does become quite the problem when machines take 2 months to actually get to the destination, and maybe a month or more before they are powered up. I have used the rack mounted battery for extra long life before on applications where there is no compact flash slot, but also since I use mostly CompactLogix, I disconnect the battery and include a flash card with the program on it. When it arrives, the user powers up the panel, the program loads from flash (via corrupt memory since there is no program on the processor anymore), and then they plug the battery back in and they are good to go. This is the only time I have battery issues since after the initial powerup, the machines are not down often at all after that. Of course, if the battery does die after this, the program is on the flash card, in the slot, and will be automatically loaded when the machine powers back on.
  14. I came across this topic and figured I'd add my 2 cents. My company has an AB tech support contract. I know it is quite pricey, and I call it maybe once or twice a month with questions. However, at least half of the time it seems that I get people who cannot help me or give useful answers. Occasionally, you will come across someone who really understands the product and gives great advice. These are the ones who say "well you cant do that, but have you tried this way?" type answers. Mr.PLC gives these types of answers all the time, which is why I come here and browse quite a bit. I know how tough it is to give support over the phone, but it seems like when you are doing this for a living, and have experienced many projects, you just kind of understand other peoples problems, and Rockwell tech support simply do not have this kind of expertise like the members of this forum do.
  15. I did contact Rockwell since things were looking pretty bleak, and they confirmed my problems. First, there is a way to get a Chinese Keyboard that pops up. Unfortuntely, it requires an Active X control which means I can't use it since I'm using a PV Plus 700. The technote is here . EDIT: Radcliffe, if you are using a VV terminal you should be able to use this control to reprogram the keyboard into a French one if needed. Also my second question involved putting chinese characters into RS Logix 5000, and you cant do that either. Since there are many string inputs in my program (some of the strings come prenamed, but they can be changed by the customer, or if new inputs are added they need to give the input a name), I found that since they do not have a static display, they cant be translated using the translation tool (since they appear as a string tag variable in the import/export file). My backup plan was to have a language bit that changed depending on the language, and when this changed, the pre-entered tag names would change from english to chinese (unfortunately they wouldnt be able to rename these anymore in chinese since I cant bring up a keyboard). But since I cant enter Chinese in Logix 5000, this will not work either. Perhaps there is a way using ASCII code to do this? It looks like I am going to have to alter my program and not give the user the option to change tag names, and additionally not be able to add extra inputs (since they cant name them). This was one of the nicest features of my application, and it looks like it won't be available on multi-language applications. I am very surprised something like this was overlooked when it came to making the language switching feature.