Sign in to follow this  
Followers 0
rami11

configuring an analog input

12 posts in this topic

hi everyone I have a pressure transmitter which is reading 0 600 bar (0 to 10 voltage) could u please tell me how to make the complete configuration on the program.I'm using plc5 with rslogix. Thanks

Share this post


Link to post
Share on other sites
We will be glad to assist you, but you're going to have to help us out a little. Are you trying to add an additional analog input to an existing system with an existing analog I/O module, or are you addding an additonal I/O module to an existing system, or is everything new? Do you already have an I/O module, is so what is the exact model number? I would guess that you now have or will need a 1771-IFE, but there are other modules. Which model PLC-5? 5/25? 5/40E? 5/60C? Will you be using single ended or differential wiring?

Share this post


Link to post
Share on other sites
Thanks Ken 4 ur cooperation..Actually I'm trying to add an analog input to an existing analog I/O module ...yes It's 1771-IFE Module in Plc 5/25

Share this post


Link to post
Share on other sites
by the way it's single ended

Share this post


Link to post
Share on other sites
((OUTPUT MAX - OUTPUT MINIMUM) / ((INPUT MAX - INPUT MINIMUM) / (INPUT - INPUT MINIMUM))) = Scaled Output This is a basic formula. One method is 2 DIV instructions, or you can do the full equasion which can be helpfull if you need to calibtrate the program to actual easily, like from a touch screen or something. The easy way is First you can do DIV 32766 / Input = F:8.0 Next DIV 600 / F8.0 = F8.1 F8.1 = 0-600 psi You might want to add some limits or something, just incase the input were to drop below the minimum or the input is to go above the maximum to prevent a Math Error that would FAULT the PLC. You possibly could do all of this with a CPT instruction (compute), but is has been a long time since I have used it on a PLC5. That and per AB

Share this post


Link to post
Share on other sites
Since you are adding an input to an existing I/O module, there should already be a BTR somewhere in your program, the BTR is reading data from the I/O module and storing it in a PLC register, an N file such as N9:x, The word that contains the raw value for your new input will depend on the which values were used on the BTR instruction. In my attached example I used N9:10 as the first address, so my raw input data is stored in registers N9:14-N9:29 (16 single ended inputs). If possible post your existing code, this way we can see exacltly what you have already. The 1771-IFE is a 12 bit card, so for a 0-10 Volt input, the card will have to be configured for a -10V to +10V, you will have a raw data default value of -4095 to +4095. Since your input has only positive voltage, you can change the default and get a raw value span of 0-4095. If this were a newer processor you could use the Compute (CPT) instruction to scale your raw data into engineering units, but it's not supported in the 5/25, so you will have to use two instructions, a DIV and a MUL. First divide the raw value by 4095, this will give you the percent of full scale, the since your engineering units are 0-600, multiply the percent by 600, the result will be the scaled result. See attached example. IFE_example.zip

Share this post


Link to post
Share on other sites
to Ken's excellent advice, I'll just add this: just in case you didn't know, the IFE cards have INTERNAL jumpers which must be set ... these jumpers decide whether each channel will respond to a voltage input or to a current input ... (they also select single-ended or differential wiring - but that's probably already been taken care of in your module) ... chances are that you won't have too much trouble with this issue ... the cards are usually set up for voltage by default ... but if things don't seem to work right, the jumpers are a logical "first step" to check ... just a tip: I've seen a couple of cases over the years where untrained technicians have gotten in trouble with this issue ... the basic idea is: Tech-1: "maybe the IFE module is causing our problem" ... Tech-2: "it could be ... let's swap our IFE module with the one just like it in that other chassis over there and see if that fixes the problem" ... quick question: what's wrong with this idea? quick answer: if the jumpers aren't set exactly the same in each module, then all bets are off ... and if all else fails, follow Ken's suggestion and post your .RSP file ...

Share this post


Link to post
Share on other sites
quote name='Ken Moore' post='32609' date='Apr 27 2006, 03:46 AM'] Since you are adding an input to an existing I/O module, there should already be a BTR somewhere in your program, the BTR is reading data from the I/O module and storing it in a PLC register, an N file such as N9:x, The word that contains the raw value for your new input will depend on the which values were used on the BTR instruction. In my attached example I used N9:10 as the first address, so my raw input data is stored in registers N9:14-N9:29 (16 single ended inputs). If possible post your existing code, this way we can see exacltly what you have already. The 1771-IFE is a 12 bit card, so for a 0-10 Volt input, the card will have to be configured for a -10V to +10V, you will have a raw data default value of -4095 to +4095. Since your input has only positive voltage, you can change the default and get a raw value span of 0-4095. If this were a newer processor you could use the Compute (CPT) instruction to scale your raw data into engineering units, but it's not supported in the 5/25, so you will have to use two instructions, a DIV and a MUL. First divide the raw value by 4095, this will give you the percent of full scale, the since your engineering units are 0-600, multiply the percent by 600, the result will be the scaled result. See attached example. Edited by rami11

Share this post


Link to post
Share on other sites
You can use the -600 to 600 scaling, but you will lose resolution. When configured this way you will only see changes of 1 unit, ie 1,2,4,46,85. But if you follow my example you get the full 12 bit resolution, the 0-600 reading will be divided over 4096 divisions, so you can see changes of 0.146484375, so you can get much more precise readings, such as 1.3, or 3.8 etc.... You may not need the better resolution, it all depends on the application. In a Single ended wiring scheme the instruments all share a single common, this works okay for 2-wire instruments which all share the same power supply. The down side is that there is much greater chance for signal noise, one noisy device can effect all channels. With a differential scheme each device has it's own common, and must be used if you have various power sources, such as many 4 wire instruments. In my opinion this is a much more robust method, but it does cost more, since you can only have 8 inputs per module. The data format is pretty straight forward, Two's complementry is the most common, the data from the card will be represented in a decimal format. BCD is Binary Coded Decimal, used in many older systems. I've never used the DAC format, so can't help you with that one, but I would assume it's a special data format for a certain external device.

Share this post


Link to post
Share on other sites
Thanks dear...In case I use The scale of 4096 I should make Raw min=-4096 , Raw max=4096 OR Raw min=0 , Raw max=4096 .

Share this post


Link to post
Share on other sites
We now agreed that I can use the -600 t0 600 range for scaling with the data format two's complement binary..what scale I should use with BCD data format...I just want to understand it more. Edited by rami11

Share this post


Link to post
Share on other sites
You get the same results with BCD that you get with 2's complementry, just that the data is in BCD format. Are you familiar with BCD? There could be an advantage to using the BCD format and the -600 to 600 scaling if you were going to display the value on a BCD panel readout. You could move the value directly from the N:x register to the output module connected to the panel readout without any further instructions. In my area of work, we have a few BCD panel display's from the late '80's, but anything since that time uses some type of HMI and no BCD needed. In my opinion BCD data format is on the way out, when it comes to AB plc's. I don't know if the new CLX platform even supports it.

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