Allen Bradley Micro820 Analog Output

Robot594

Member
Join Date
Feb 2022
Location
new york
Posts
5
Hello to all. I am new to PLC’s as well as this forum so if I make any mistakes please forgive me.

I am having an issue using the 2080 OF2 output module with the Allen Bradley Micro 820 PLC. I am trying to use the analog output current pin to send a 4-20mA signal. I understand from the data sheet and various sources that the range for 4-20mA is analog range of 13107-65535. I know how to configure the output module and the PLC. My issue lies with the code. How exactly should I put a, say for example 4mA on one of the pins? I have seen various sources use scaler and MOV instructions and ANYtoREAL instruction. However I am not measuring 4mA on the pin I am getting nothing. What kind of code should I write in order to put the mA output on one of the pins? I am simply trying to output 4-20mA on the output module. Thank you for all suggestions and I apologize for any rookie misunderstandings I may have. Thanks!
 
That could be the issue. With that said what is the go to method to write 4-20mA? Do I have to scale it first then the output is what goes to the pin? I guess I’m not sure what value needs to be written so that the plc can put this on the pin.
 
I haven't done it, but I am pretty sure the 2080 OF2 takes a 16-bit unsigned output (UINT), and scales the current signal linearly. So the output would be something like

* target_mA 327.675 target_raw_real

ANY_TO_UINT target_raw_real target_raw_uint

MOV target_uint _IO_P1_AO_00


Whether the intermediate target_raw_real is needed is TBD.

How you get to your target_mA is dependent on your process, obviously you could scale directly from whatever process calculation is required. E.g. if a valve output of 10% requires 4mA, and a valve output of 90% requires 20mA, then the conversion would be

- valve_output 10 target_mA

/ target_mA .177777 target_mA

+ target_mA 4 target_mA



obviously scaling [10:90] to [13107:65535] using a scaling function would be easier. but whatever value you use it should probably be limit-checked and clamped to 4 and 20.
 
So if UINT is 13107-65535 for 4-20mA couldn’t I just create a UINT variable of 13107 for 4mA and use MOV to put it to the pin?
 
So if UINT is 13107-65535 for 4-20mA couldn’t I just create a UINT variable of 13107 for 4mA and use MOV to put it to the pin?


Again, I have not done it, but I would think so, yes.


How to measure that 4mA is another matter: a VOM reading current does so with very little resistance (load) in series with the circuit (to minimize the effect known as the Heisenberg Principle), and the Analog Output might be designed to detect at no-load situation and not do anything in that case.

N.B. again, I am guessing here.
 
In this case I may be able to just use one of the voltage pins and check with the meter. The range for voltage is the same as the range for current with 65535 being 10v. I would assume I could simply measure the voltage at the pin and get a reading. If the code works for voltage output then it should work the same for the current.
 
If I recall right, Scaler block can only handle reals. So you have to pass the output to a intermediate real. then use a AnytoUInt and MOV that to the output.

CCW sucks, to program with it is like hitting yourself in the head with a hammer.
 
I think you’re exactly right, the conversion to real is only needed for the scaler. And yes, I’m quickly starting to realize that about CCW lol
 

Similar Topics

Hi Everyone, I have a small project where I need to read plc data from sensors and store them into a sql db. Currently looking for: - heat...
Replies
7
Views
2,768
Hi everyone, I have a small project where I need to use plc to get sensor data and log them to an sql server locally or remote. I have found...
Replies
7
Views
2,814
Trying to export my tags to a CSV, according to the help file just select the tags and copy then paste into excel, this works for local variables...
Replies
5
Views
2,480
Can someone give me some advice on how to download a program onto this processor? Am using a crossover cable but not able to see the processor in...
Replies
3
Views
2,018
I am looking to connect an Allen Bradley Micro820 processor and an C200 HMI panel via Serial Connection. Anyone have any suggestions?
Replies
4
Views
9,271
Back
Top Bottom