Sign in to follow this  
Followers 0
BenJones

What an earth am I doing wrong ?

19 posts in this topic

Hi, I'm very new to all this PLC programming stuff. Just started last week and I have programmed a few simple things. I'm now trying to use a function block for Scaling (I am using IntScale). When in monitoring mode I can see the input change (from 0 to 4000) but there is no scaled output. Does anyone know what I'm doing wrong ? I'm looking at Analog I/P card 1, channel 1 in voltage mode, this corresponds to M8260. Maybe its a problem with the data register D2 that I've assigned, I don't know ? Many thanks in advance, Ben

Share this post


Link to post
Share on other sites
This is the FB as I've set it up :

Share this post


Link to post
Share on other sites
Hi. First of all: It looks like the "EN" input is "low"..... Is the PLC in RUN? Second: Have you assigned D2 to anything, or do you use D2 anywhere else? (use [ALT]+F3 to search for "D2", and select the entire project when searching).

Share this post


Link to post
Share on other sites
Hi there, Hmmm, thats what I thought, so I've jsut tried changing the input to M8000, which has subsequently put the input on high and yes D2 was used for something else so I've now used an empty data register (D8) and also tried D100 but still no joy. I'm in England and have spent literally all day trying to get this bloody block to work. Anyway, it's the end of the day and I'm off home. One thing I did notice though is that the FB was supposed to be used with a previous version of the GX IEC Developer and when it changed it to work with the newer software it now shows 23 warnings when compiling (no error messages though). Not sure if that could be a problem or not. Any other ideas and please let me know cheers, Ben

Share this post


Link to post
Share on other sites
It depends how 'old' the FB is (which version of GX IEC it was created in), and the contents of the FB. The IEC standard changed a bit around GX IEC 5.02 and GX IEC 6.0 which in some cases can affect the code when upgrading from older versions.... Upload the project and I'll take a look!

Share this post


Link to post
Share on other sites
I'd offer assistance if I could, but I've never used GX IEC Developer. We use regular GX Developer in the states.

Share this post


Link to post
Share on other sites
The reason your block isn't working is because EN should be marked Yellow. This means either the PLC is in Error or in Stop!!!!! Edited by Gambit

Share this post


Link to post
Share on other sites
Great, thanks for all you help guys, got it working ! Tbh I'm not sure what the problem was but got it scaling nicely now. The FB was built for GX IEC version 7 and I'm using version 7.3 and when it compiles it generated 39 warning messages which could be better. Anyway, it now does what is says on the tin so cheers. Going to move onto timers now so that I can put delays in...my fun task of today All the best to you guys in the States, Ben

Share this post


Link to post
Share on other sites
In IEC Developer you have TON & TOFF which are easier to use you only have to put in a time (The Time varoable converted to decimal value however should not be higher than 32767)

Share this post


Link to post
Share on other sites
Thanks Gambit, Ok, I'll try a TON timer then. Hmmm, the 4 pins are: IN, Q, PT and ET. So shall I put say X0 (digital input) on IN, and dig. output for Q (say Y0). Looks like PT and ET are time inputs ? It doesn't like it if I just put numbers on these inputs.

Share this post


Link to post
Share on other sites
NO if you want to use numbers you'll have to use standard FB. Now you can input for instance T#5m30s

Share this post


Link to post
Share on other sites
Hmmm, not quite sure Gambit, The PT and ET pins don't like eg. T#5m30s or numbers. If I click on the block and press F1 I get the Help file, but I find that the help files and explanations aren't really that good. I'm really not sure how to use this block. Could you give me an example of what I would put on the 4 pins if I wanted to say turn on Yo after 5 seconds after presing X0 ? Will this block do that or do I need to use counters as well ? Ben

Share this post


Link to post
Share on other sites
Works for me But you can only use it for PT (ET is the Elapsed Time) Edited by Gambit

Share this post


Link to post
Share on other sites
HAHA ! gAMBIT YOU ARE THE MAN !

Share this post


Link to post
Share on other sites
GAMBIT YOU ARE THE MAN ! Now how much do I owe you ? You just cant fault the Dutch ! Thank you once again and I hope that when my PLC knowledge improves I will one day be able to help you.... Ben

Share this post


Link to post
Share on other sites
No problem !!!Have a Good weekend

Share this post


Link to post
Share on other sites
Ok, I've put in X0, y0 and T#5s but it is coming up with errors. Do I put anything on the ET pin ? I see that you have Tijd ?

Share this post


Link to post
Share on other sites
You haven''t defined your FB It's still on Instance!!! Give it a name defined in the local header like you did for your Intscale FB (ExIntScale) The ET doesn't need to be programmed Edited by Gambit

Share this post


Link to post
Share on other sites
Yes ! Finally done it (thanks to your help). Spent all day doing it but I am very new to the program so just learning how to do function blocks and small programs, but we are slowly getting there. Thanks again for your help, and have a great weekend yourself cheers, ben untitled.bmp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0