PLC Code Help GE Fanuc 90-30

Join Date
Nov 2009
Location
Bowling Green
Posts
61
I am programming a PLC with the following inputs: 6 push buttons, 4 2-position selector switches, and 4 3-position selector switches. The 3 position has an off position and 2 active states. I have 6 OUTPUT lights. These are all digital inputs and outputs, I now have an analog input connected to a potentiometer and to be connected to an output voltmeter. 10V is inputted across this potentiometer, and when I adjust the POT the voltage( 0-10V) can be read on the output voltmeter. I have never done any programming with analog inputs/outputs. What I want to know is if this this is possible and maybe how it is done:

I want to be able to adjust the POT to read 0-10V across the output voltmeter. If the meter is reading between 0-2V I want to jump to this subroutine or program and my buttons/switches will operate somehow to control the 6 lights in some kind of instruction set I have developed. If the meter is between 2-4V I want to go to this subroutine my buttons ans switches have a different program to run by. And so on...Is this possible?

This is a PLC trainer we are developing and I have asked questions about this project before on here and this is a new task we are looking into performing. Any feedback or help would be much appreciated. Thanks
 
Your analog input card in the 90-30 will be addressed to %AI memory. Let's assume you're using the least expensive, 4-channel, 12-bit voltage input card (IC693ALG220), and configure it to use %AI001 - %AI004.

If you wire your Pot to the first channel of the module, then a ten volt signal will give you a value of 32000 in %AI001. Crank the pot down ot five volts and you'll get a value of 16000 in %AI001. You can use arithmetic instructions in ladder logic to scale the values if you want. Other analog modules allow you to scale the value in hardware configuration.

Analog output modules are configured for %AQ addresses.

The 90-30 function set includes six comparison functions (EQ, NE, GT, GE, LT. LE) that you can use to select which subroutine to call.
 
I am not sure which card we are using right now. I would code the PLC to write the value of the voltage signal to some memory address correct? Then I would compare that memory address to some other value in another memory address. If the comparison is true then I jump to a subroutine, if not then will it check the next memory address?

I think before you told me the subroutines in GE programming software are called call blocks correct?

Thanks
 
I would code the PLC to write the value of the voltage signal to some memory address correct?
You do it in hardware configuration.
If the comparison is true then I jump to a subroutine, if not then will it check the next memory address
If the comparison is false, the subroutine doesn't get called and program execution proceeds to the next instruction following the CALL statement.
I think before you told me the subroutines in GE programming software are called call blocks correct?
GE calls subroutines program blocks. You use a CALL instruction to execute them.
 
Ok, I haven't done anything with hardware configuration. In the hardware configuration will I setup a memory address for the Output value? And that value is whatever the voltage reading is? Then I'll just set up call blocks which will compare a value to that memory address and then it will know to execute it or not depending on if that specific all block is true or not?
 
Hardware configuration is where you assign a PLC memory address to an I/O module. For an analog input module, you assign a %AI address. For an analog output module, you assign a %AQ address. Different modules provide different options for relating the value in %AI or %AQ memory to the actual voltage at the module's terminals. To determine exactly what to do for the hardware you're using, you'll have to RTFM. Download a copy of GFK-0898 from the GEIP website.
Then I'll just set up call blocks which will compare a value to that memory address and then it will know to execute it or not depending on if that specific all block is true or not?
You'll use a GE instruction that compares the %AI value to a constant. You'll connect the output of that instruction to the input of a LE instruction that compares the %AI value to a different (bigger) constant. You'll connect the output of that instruction to the CALL statement.

You really need to get the hardware for this project in front of you. You're asking very basic questions that you should be able answer for yourself by simply trying things. If your first idea doesn't work, try something different.
 
We have been put on hold for a couple weeks and still waiting for some equipment. They said they are going to give us Machine Edition but I have a copy of VersaPro, and that will work wont it? Any work I do in VersaPro can that be transferred to ME? I have a copy of gfk1670d to look over and I am going to soon.

It does seem like a basic operation and I am looking forward to getting all of the hardware so I can start testing this. The %AI value is what I will be comparing to a constant to trigger a CALL statement. Will I do anything with the %AQ address?
 
but I have a copy of VersaPro, and that will work wont it? Any work I do in VersaPro can that be transferred to ME?
You're making my point about the need to have the hardware in front of you. A month ago you started your first thread about this system.

http://www.plctalk.net/qanda/showthread.php?t=52732

You were reassured in more than one post in that thread that VersaPro projects can be imported into Machine Edition, yet you felt the need to ask the question again, probably because you lacked first hand experience that the previous answer was correct.
 
Yes, sorry for being so repetitive.

I have a LE INT block in VersaPro, on the left side of the block it gives me an input on top, below that it has IN1, IN2. On the right side of the block is has an output which I suppose goes to CALL, and Q which I am assuming I do nothing with right now.

Is the %AI0001 the input? Will the IN1 be %AI001 again and IN2 be a constant to compare the two values?
 
In addition to the GFK-1670 manual that you already have, I recommend GFK-0467 which includes a description of the entire function set. GFK-0467 was originally written for Logicmaster software, but I still find it useful.

There are also instruction descriptions in the VersaPro help files. Click on the question mark icon and drag it anywhere in the ladder editor window.
 
The manual I have doesn't do an adequate job of explaining how to use instuctions. It is probably just because I am a beginner and that is why I think that.

When you said to use the comparison functions, was I using the correct one?
 
I found a manual and it looks like I was using the correct Function. I'm not real positive what to connect to the Enable. Is the Relational Function just the code on the run, then values being compared going into I1 and I2, and then output is going from Q to call. If the function isn't true it will go to the next function. Mine looks like this and not sure what is to be connected to the top line if anything. From the manual the top most line on the left going into the LE INT is the Enable.
(The periods are empty spaces, it kept messing up on my browser, sorry if it is hard to understand, it is suppose to look like a rectangle with the enable on top and I1 & I2 below it and the Q on the right side.)

.-EN------------------
.......-.LE.INT.-
.......-...........-
.......-...........-
...--I1-.........-
.......-.........-Q
...--I2-..........-
.......----------
 
Last edited:
OK, a quick explanation of the way GE does function blocks.

Upper left node is always a boolean element. If true, the function is performed; if false the function is not performed.

Remaining nodes on the left are inputs to the function. They may be boolean elements or they could be numeric values, but they are always information required to make the function work.

Nodes to the right of the function block are the outputs of the function block, ie the result(s) of the function being performed. They may be boolean or numeric data. Most important is the one labeled "Q". That is the direct result of the execution of the function such as Q = I1 + I2 or Q = I1 EQ I2.

Where the order of data matters, the order proceeds from top to bottom. For example, if using an GT function, think "If I1 is greater than I2, then Q is true".
 
Ok, in my program I am having trouble with what should go in the upper left node.

It seems like in my program I just want to compare the analog input which would be I1 or I2 with a constant I1 or I2 and if found to be true then output Q is called and the call block is executed.

How do I get the function to execute, do I have to assign a variable or constant to the node with a value of 1 to every function so it will execute?
 
Have you discovered the "verify" icon? It might be called "validate" rather than verify. I can't remember for sure. You can use it to see if your program is entered correctly.

When you try to verify the rung you will probably get a message that says "Disconnected instruction" or something similar. You will need to connect the enable node to the left hand rail. If I tell you how, you will simply come back with another question that you ought to be able to figure out on your own.

I'm getting tired of answering questions that you ought to be able to work out on your own. Based on what I've already told you about how the function works, and the answers you were given in your previous thread, what do you think you need to do?
 

Similar Topics

Hello, i am currently trying to create a plc programme from my Tia portal v16 for a package filling machine. But i am kinda new to the plc stuff...
Replies
48
Views
17,434
i am new to these things. I have no intention of using this in a commercial way whatsoever. I wanted to write a small plc programme for myself. We...
Replies
18
Views
7,917
Hello Guys, I need your help to look into my code and please tell me if this code will work? Logic If there will be part or product on conveyor...
Replies
7
Views
2,864
Hi every body. I am new here also very new in PLC coding. I need to write ladder code for the following conditions. 1. When you press the button...
Replies
46
Views
10,133
Hello there, appreciate if someone kind enough to teach me or show me how to solve this problem. Realy headache with this.. Thanks!! =) I'm...
Replies
15
Views
8,328
Back
Top Bottom