cHud

MrPLC Member
  • Content count

    389
  • Joined

  • Last visited

Posts posted by cHud


  1. I have to disagree. If grafcet is in the middle of its steps....why do you care about what has happened above where it is now? The only thing of interest is what is going to happen next. 

    The transition stays active to show you that the program passed through the logic. When the sequence starts again at its initial step then the transitions are cleared again. 

    I think your problem comes in where you are using %M as the transition condition. Make a transition section and put the conditions inside for the transition. Dont write your conditions outside and then use a reference as a variable condition for that transition. Then you have to bounce back and forth between sfc and another section just to check what is holding it out now

    If you still want to use the %m as you are doing you can just deactivate the following setting in the project settings.(Setsteps)

    sfc.PNG


  2. You could have 2 internal words(control of these words can be done in plc or cicode). One that increments at 12:00 every day and one that increments everytime you receive send the pulse So if you compare the 1st internal word since the last time you wrote to the file and it is the same then you know to compare the second words value to know in which row to write the value to.  If the 1st internal word is different to the last time you wrote to the file you know to create a new file and write new value to 1st word and zero the 2nd word to start the process again. Hope you understand this. There are lots of different ways to do this. This is just the quickest way I could think of now  

  3. Like I said if you want to create a report like for batches or something that needs a new file then do what I did. If however you want just one excel file with continuous values then you have to paste a specific link in each cell of an excel file. (I'm not 100% sure about the syntax of this link, but if I remember I searched quite a bit on google for citect and excel and found the syntax on a forum). Why would you want to display tags on an excel spreadsheet in citect if you have the tags values already in citect. You can just display them on a page like you did. Otherwise you are going to have to use active x in citect to display the spreadsheet. Look in the help for this

  4. Have you had a look in the help file for the explanation of the Read_var and write_var function blocks. It describes the complete operation of this. Mb_Rx30 will be an array containing the Values of %mw0-9 on the other plc or remote IO. Which I presume will be a mirror of all the remote inputs. Normally each bit in a integer will be an input. The same goes for Mb_Tx30 which will be an array of words being written, again I presume to outputs. Again normally each bit in a word will be an output Have you put those two arrays into an animation table to see what is inside them? Somewhere in the program these elements in the array will be written to and read from like the one object giving an input on the valve feedback. That input gets its value from the mb_rx30 array somewhere in your program

  5. Ok first of all in in your ddewrite functions where you put "temp001" look at my example. This must be the row and column number. Secondly are you calling the function "write" in the scada somewhere? With a button or an event? This code doesnt permanently write the data across. It must be triggered and then will write the data. If you want to permanently have the real value of the tags displaying in an excel file other codes needs to be used. Did you create a excel file called Template.xlsx and is the file situated in the directory that you put in the code?

  6. I also struggled for a long time to get this right....but in the end it is very easy. Heres an example of cicode I used. 1st thing is to create a template in excel and save it. The file copy will make a copy of the template and save it as the newfilename. In this case it is a integer generated in our plc Exec function will open the excel file. You must copy the whole path of excel's exe file into this function. Next you write the values in the rows and columns you specify in the ddewrite function. And the last DDE functions just closes the file. I dont mind sharing this at all as schneider sent me on a wild goose chase before I found out it was very simple FUNCTION Write();STRING NewFileName;NewFileName =IntToStr(Recipe1_Batch_Number);FileCopy("C:\Template.xlsx","C:\Reports\"+NewFileName+".xlsx",0); Exec("C:\Program Files\Microsoft Office 15\root\office15\EXCEL.EXE C:\Reports\"+NewFileName+".xlsx",6); DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R2C1",ING1_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R3C1",ING2_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R4C1",ING3_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R5C1",ING4_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R6C1",ING5_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R7C1",ING6_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R8C1",ING7_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R9C1",ING8_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R10C1",ING9_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R11C1",ING10_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R12C1",ING11_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R13C1",ING12_NAME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R15C1",Handout1_Name);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R16C1",Handout2_Name);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R17C1",Handout3_Name);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R18C1",Handout4_Name);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R19C1",Handout5_Name);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R20C1",Handout6_Name);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R21C1",Handout7_Name);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R22C1",Handout8_Name);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R23C1",Handout9_Name);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R24C1",Handout10_Name);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R2C2",Recipe1_INGREDIENT1_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R3C2",Recipe1_INGREDIENT2_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R4C2",Recipe1_INGREDIENT3_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R5C2",Recipe1_INGREDIENT4_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R6C2",Recipe1_INGREDIENT5_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R7C2",Recipe1_INGREDIENT6_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R8C2",Recipe1_INGREDIENT7_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R9C2",Recipe1_INGREDIENT8_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R10C2",Recipe1_INGREDIENT9_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R11C2",Recipe1_INGREDIENT10_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R12C2",Recipe1_INGREDIENT11_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R13C2",Recipe1_INGREDIENT12_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R15C2",Recipe1_HANDOUT1_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R16C2",Recipe1_HANDOUT2_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R17C2",Recipe1_HANDOUT3_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R18C2",Recipe1_HANDOUT4_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R19C2",Recipe1_HANDOUT5_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R20C2",Recipe1_HANDOUT6_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R21C2",Recipe1_HANDOUT7_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R22C2",Recipe1_HANDOUT8_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R23C2",Recipe1_HANDOUT9_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R24C2",Recipe1_HANDOUT10_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R25C2",Recipe1_MOL_MIX_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R27C2",Recipe1_SP_TOTAL);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R28C2",Recipe1_MIXING_TIME);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R29C2",Recipe1_MC31_SPEED_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R30C2",Recipe1_MC33_SPEED_SP);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R2C3",Recipe1_INGREDIENT1_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R3C3",Recipe1_INGREDIENT2_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R4C3",Recipe1_INGREDIENT3_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R5C3",Recipe1_INGREDIENT4_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R6C3",Recipe1_INGREDIENT5_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R7C3",Recipe1_INGREDIENT6_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R8C3",Recipe1_INGREDIENT7_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R9C3",Recipe1_INGREDIENT8_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R10C3",Recipe1_INGREDIENT9_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R11C3",Recipe1_INGREDIENT10_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R12C3",Recipe1_INGREDIENT11_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R13C3",Recipe1_INGREDIENT12_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R15C3",Recipe1_HANDOUT1_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R16C3",Recipe1_HANDOUT2_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R17C3",Recipe1_HANDOUT3_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R18C3",Recipe1_HANDOUT4_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R19C3",Recipe1_HANDOUT5_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R20C3",Recipe1_HANDOUT6_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R21C3",Recipe1_HANDOUT7_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R22C3",Recipe1_HANDOUT8_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R23C3",Recipe1_HANDOUT9_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R24C3",Recipe1_HANDOUT10_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R25C3",Recipe1_MOL_MIX_PV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R27C3",Recipe1_PV_TOTAL);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R2C4",Recipe1_INGREDIENT1_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R3C4",Recipe1_INGREDIENT2_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R4C4",Recipe1_INGREDIENT3_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R5C4",Recipe1_INGREDIENT4_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R6C4",Recipe1_INGREDIENT5_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R7C4",Recipe1_INGREDIENT6_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R8C4",Recipe1_INGREDIENT7_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R9C4",Recipe1_INGREDIENT8_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R10C4",Recipe1_INGREDIENT9_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R11C4",Recipe1_INGREDIENT10_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R12C4",Recipe1_INGREDIENT11_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R13C4",Recipe1_INGREDIENT12_DEV);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R15C4",Recipe1_DEV_HAND1);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R16C4",Recipe1_DEV_HAND2);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R17C4",Recipe1_DEV_HAND3);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R18C4",Recipe1_DEV_HAND4);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R19C4",Recipe1_DEV_HAND5);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R20C4",Recipe1_DEV_HAND6);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R21C4",Recipe1_DEV_HAND7);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R22C4",Recipe1_DEV_HAND8);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R23C4",Recipe1_DEV_HAND9);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R24C4",Recipe1_DEV_HAND10);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R25C4",Recipe1_DEV_MOL_TO_MIXER);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R27C4",Recipe1_DEV_TOTAL);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R31C2",RECIPE_NUMBER);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R32C2",Recipe_Name);DDEWrite("Excel","C:\Reports\"+NewFileName+".xlsx","R33C2",Recipe1_BATCH_NUMBER); DDEExec("EXCEL.EXE","[Close(1)]"); DDEExec("EXCEL.EXE", "[Quit]"); END

  7. I hope a moderator can move this topic to the right thread (modicon/telemecanique/schneider) Hi Dave 99% sure there is no way around this. But you dont have to rebuild the whole program. build only applies to the sections where the changes were made(you have to build options when a change is made). If you change a timers value and build it should barely take 2-3 seconds. Trust me when I say Unity is light years better that proworks32. Think it is just something to get used to. If you absolutely cant wait for things like timer settings. Create unlocated variables that you place on the timer pt legs. This way you can adjust the value of the variable in an animation table without rebuilding

  8. I dont know Readlion but this is what I would do with other softwares Do you have a visibility option on rectangle/square you can draw? If so draw it over the main page and set an internal bit with the button that opens the popup. Then reset the bit again with the button that closes the popup