Hello friends welcome to my tutorials today we are going to see how to program a traffic Poll for Two Poles traffic signal for Two Poles okay here we are going to have some simple example here I already have a pole one and pole two uh signals over here this is the pole one okay this is pole two and here we are going to have this is a y naught y1 Y2 Y3 y4 and Wi-Fi so when we click on start button okay start means when we are going to initiate the sequence first one bit we are going to trigger that it will be like uh c m naught okay I am not this we are going to provide for so consider this will be remaining one like Y3 will be 1 and green will be on okay like Y2 okay this is the table which we are going to prepare for I am not these two will remain one for concealer uh five second or ten second ten second Ten Second it will be remaining one that is true okay and condition this condition we are going to also the false okay so after 10 seconds M1 we are going to generate that we will have both Y2 means yellow okay that will be y1 and y4 okay these will remain on for 5 seconds and next uh sequence after five seconds M2 I will generate M2 I will generate like here how we are going first green to yellow yellow two green so next first thing red to Yellow to Green this is done now okay now after five second we are going to trigger back like uh Y2 i1 and y4 is done next will be like wife Y2 and so first was Y2 y1 and not y not and iPhone like this okay it is going in this direction so why not and Wi-Fi okay Wi-Fi will be high and after this again this will remain again consider for eight seconds okay we'll remain one and after this retrigger the M naught three trigger they are not so this is the concept simply we can use set wit set and reset okay this will check in how we can perform in GX works okay now let's start the programming and the same thing we are going to simulate in GG designer so here I'll select one program new program FX CPU this I will select this is enabled for simulation so simply I will create one new project so here we start our programming like uh okay here one more point we forgot that to consider that this start button will be X naught actually I will select X naught in this because through HMI we can control we cannot control the inputs but if I take also it will work but in actual system we will not take this Hardware this is hardware controlled input address so for HMS and all we have to take one memory bit like a m and something okay so there will be a range from M 0 to M 255 and all that we have to take it in uh get noted on in the data sheets okay so let's start with the programming so simply I will use x naught here okay and here I am going to have not this set I am not just a second this I'll press enter here here I will add set m0 this is done now after this we have to run one timer you need to run one timer uh for that we will take M naught's input okay that is F5 M naught no t 0 space how much time we have taken this M naught will be for Y2 and Y3 so this will be remaining high for 10 seconds t 0 space K 100 okay timer is running for 100 second so first point we have to make that using t 0 you have to set M1 and simply we have to set reset M naught okay this parallel run I will uh vertical line I'll draw okay now this red will be turned off and uh green will be turned off now both M1 will be used to turn on yellow okay next will be using this m naught only what I will take M1 next is M1 one more timer will run T1 space that time how much we are taken that is for 5 Second okay D1 space k50 in previous example I showed I told you why we are taking 50 for 5 second that is the time based value of to consider that is a thousand millisecond so just to go through my previous example and now this is t 0 sorry T1 once T1 is high so that T1 will take and we will set M2 and reset M1 okay here I am using shortcut keys shift F9 for vertical line okay now yellow is turned off so next is what so let me check one once again M naught is on using this these we have reset and okay here I set M2 and M1 reset M1 so MTR generated here we'll check M2 is high for 10 8 second so simple simply I will take one M two four eight seconds since 5 Seconds so M2 I have to take simply M2 and next one timer we have to run that is T2 space k80 that is for 8 second now when this after 8 Seconds again we have to retrigger M naught okay first we have to reset M2 and again sorry reset M2 and set M naught so simply by setting M naught so X naught is there so one trigger one pulse I will generate yeah this we can take that is T2 I will take here sorry here I have to take T2 okay using this T2 when pulse we will generate it is still M naught M1 M2 you have taken so I will take M3 over here okay memory bit third memory bit M3 so this Square are taken M3 okay this M3 here again I have to reset first rst reset M2 this vertical line vertical line shift F9 so this M3 what I'll do here one run guy will add insert one row let's just right click here go to edit insert row okay it is added above the line so here I will select edit insert row so simply I will take M3 parallel to this okay this is all done now in between if anything goes wrong so uh now it is time to say uh allocate the memory bits for those output bits okay simply I will take for M naught here Y2 and Y3 we have to generate M1 and M2 okay why not y1 Y2 Y3 y4 Wi-Fi so again let's check whether it will take or not if not I will take that Y2 and Y3 so here I have to take Y2 I will check whether it will take or not 2 and Y3 this I am going to connect parallel okay I'm not next M1 Y2 Y3 y1 y4 okay y1 y4 here I will draw one vertical line y1 y4 I'll take here y4 okay next M2 y naught and Wi-Fi simply take y naught one parallel vertical line next is what Wi-Fi okay so this is the sequence for me let's check the output whether it will work or not first that we have to convert it okay compile press F4 it is converted now before checking we'll go to GX works and try to develop the traffic rule for okay not GT designer actually not injection from GT designer so here we'll create one new project in GT designer we can simulate together GT designer and GX works okay this simple 6448 I will take I'm not going to change anything not going to do extra things okay and here if possible if you need you can add screens you can name the screens now only later on also you can add the screens if needed okay here I finish this now let's take one switch in this I'll take it as a start button Here style text Everything is Everything at the key touch Style okay here we can change the designs and we can add the text if needed okay start this I added see here I will take x0 this is the momentary alternate in the sense when you click it will be pressed when I click again it will be released movement in the sense when you click it will be pressed when you release the click it will be released set in the sense it will be remaining set okay another reset will be it will be like a normally open okay here I've added and click ok simply I will add the lamps over here this is I'm going to select okay one more lamp I will add okay this all together before that will simulate one by one your device is y0 just a second where we have to check the things y naught y1 Y2 Y2 oh sorry y three y four Wi-Fi so this will be y naught y0 red yellow green so let's check this red yellow green in this fashion only we are taken so I'll take red this will be yellow so this on condition I'm going to select yellow or orange I'll select this will be y1 okay next will be green so simply I'll take a green so one more thing uh we can when it is turned off we can take one light green also okay this second take this I can take like this is a background color this will add a simply for yellow also we can add like that here I've taken orange in the sense okay let me take a yellow only okay this is this will be yellow and this we are going to have the dark yellow so you have to choose the color wisely and this green this will be red okay Simply Red is okay but the off condition we will take light red okay this is all set simply I will copy this lamps and take just I'll change the addresses okay this y naught y1 Y2 are taken this I will take Y3 y4 this will be Wi-Fi okay this will be Wi-Fi so here I think it is not taking it is not taken why not y1 Y2 okay this will be Y2 okay why not y1 Y2 so I added the um it's linked to the device so simply will trigger will run the simulation we'll start the simulation it will turn on the GX emulator so it is downloading virtually the PLC programs so it is added now close okay foreign now let's move towards the GT designer here we'll start the simulator it will open the main screen means this UI screen for us separately here it is opening I don't know why it is opening so we'll just taking a time I'll pause the video so click on yes so here we got the screen so it should work actually let's check the program over here oh now it is triggered is working little bit slow in just a second okay here we go this is done simulator is on monitoring Iran so let's check the result actually here are some changes are there so here we go actually it should work let me drive it manually here okay watch control here I will trigger this so everything is working fine actually but let me check with this button cell remove and I'll take one bit switch so which switch address is x0 area will add x x 0 now let's check this result and let the simulation again I have to start the simulation so it is taking a little bit time so I'll pause the video so let's check the result I don't know why it is not working PLC is in run mode this is also run mode here we'll check the program actually working fine I'm not is why it is not giving the outputs okay let me if I figure it in just a second so friends as I said um we cannot take we can't we cannot trigger this input from the HMI so I'll stop the simulation my simply I will add one run okay stop monitoring so here we have to go to edit mode okay right mode so then only we can edit this so one more button I will take M3 we have taken the last one so I'll take it as M4 okay convert it start the simulator so till it starts here Will change this address to import okay again we'll start the simulator for this also told like uh actual input address it will be controlled by Hardware from PLC and that tag we cannot use in the simulator so that's why one parallel contact here I've taken okay that is called M4 and the same thing I have added here also M4 thank you so let's trigger this so simulation is working little slow not little maximum slow I don't know why but let's check the output over here let's check in program M4 is connected parallel to this so this I'll go to monitor okay simulator started for this also button why it is not ticking just a second I'll start once again the simulator here this is then it is working fine so GT designer I'll check this also will close so here you can see Jake simulator 2. it is taking the Jake simulator to and so here in communication nothing I will try to one more thing like what simulator must be same then only it will be working fine so let's check with the simulator which simulator will turn on so this is redirecting to GX simulator so that is why it is on because Jake's Simulator 2 we are using so it is redirecting to GX Simulator 2 so here will stop this here is the simulator set button okay actually one more thing that how many bugs or whatever things we forget we will try to fix the bugs and all it is best because we can learn maximum so here I will click on jig Simulator 2 because you can see here this is GX Simulator 2 for this ladder program okay so I'll set this apply okay and now I'll start the simulator to check the result so here guys it is working fine because we have selected the wrong simulator in GT designer so it was not working both yellow are on now Poland Reds and hold to Green again it is resetting to the resetting back to okay guys now it is working
2023-03-07