Unity, M340's, and Analog Input IODDT's

n0pe

Member
Join Date
Aug 2017
Location
Canada
Posts
13
Hello. I'm trying to set up an M340 with a BMX AMO 0410 and a BMX AMI 0410 in Unity Pro XL 13.1. While trying to set up the IODDT for the card, I've noticed my I/O doesn't line up properly when I select the %IW Object type for the card itself, and select T_U_ANA_STD_IN_4 as my type in the Data Editor.



I believe each analog channel's value tag should follow the following scheme:

HXjKGjPMhuTrJqfPNh5DXUDb2VHVSi1c+BKByH8IoOgDZqbPT+YBcXAKEmSQfwswkQpjpD8oOte8LC6UUAAAAAElFTkSuQmCC

Gp5YR9o.jpg


When I select the T_U_ANA_STD_IN_4 type, my registers line up much differently (along with the channel health info, etc. which I would like to keep!):

wUy1VH6.jpg


Is %IW the correct object type for this? Could I be setting this up in a more intelligent fashion? Using this scheme, the .value tag for each channel lines up to the following:


%IW0.1.3.0
%IW0.1.10.0
%IW0.1.17.0
%IW0.1.24.0


When it needs to line up to the first screenshot:


%IW0.1.0
%IW0.1.1
%IW0.1.2
%IW0.1.3


Can anyone suggest how to rectify this and still get the channel metadata such as health, etc?
 
From memory, it should be %ch or %mod for iodtt.
You can check correct ioddt type and make variables if you double click analog card, select first page and the select io and ok.

I can check later.
 
All the addresses in any type instance have to be sequential.

What are you needing to map the input addresses to iW for? Is there a remote device reading them directly over modbus? Normally if there's a requirement to do that, I make a few INT arrays with MW% Addresses, then use MOV instructions to populate them. You could do the same with iW address if you must have the data as Input Registers.

Or Lares method should work too then it's not dependent on writing code.
 
@Lare I can see the %CH but not %MOD in the listing here:

qJE5Og2.jpg



I do see the default types here:

ed1VmQ3.jpg



@Saffa I'm not necessarily looking to reference these tags elsewhere. The plan would be to map these to another easier to read tag after I have the reference to the hardware working. I can then set up %MW tags if I need to reference the easier to read tags.



I have custom DFB's for digital cards I was hoping to expand out to AI's and AO's so I can streamline the mapping process for this and future projects, but it would be nice to take the metadata with the analog values for troubleshooting purposes.
 
You have to upgrade grid, then first make Mod names and then separately channels.


p.s1 variables are with %CH, %I and %MW addresses.
p.s2 Usually I have coded only %IW-channel variables, and maked channel error of reated value if enoght low.
With IOODT you get much information or only channel value and error (generic)

AI_IODDT1.jpg AI_IODDT2.jpg
 
Last edited:
Just an update cause it stinks when people don't update. Lare's suggestion gives me nicely laid out IODDT's for the analog cards.



I still haven't found a way to cleanly turn this into something a function block can handle as the input output structures don't accept the types in the IODDT. I suppose I could use some tags in between as aliases to get the job done, but by the time I do that, I may as well program it manually.


Thanks for the help!
 
Just an update cause it stinks when people don't update. Lare's suggestion gives me nicely laid out IODDT's for the analog cards.



I still haven't found a way to cleanly turn this into something a function block can handle as the input output structures don't accept the types in the IODDT. I suppose I could use some tags in between as aliases to get the job done, but by the time I do that, I may as well program it manually.


Thanks for the help!


I think that it is only way.
Schneider have only examples for M340 which uses move block for intependent IODDT variables.


With M580 you could use DDT-structures and connect DDT to input of FBD block.
 
why is it not allowed to have an in-out pin on a DFB of type T_GEN_MOD?


It is allowed to have an inout of T_ANA_IN_BMX
It is allowed to have an in or inout of T_U_ANA_STD_IN_4


I have never used the IODDTs but I am curious as to what is going on that would cause there to be some restrictions.


It seems like it is OK to use the IO DDTs that specifically mention the M340 module numbers in DFB pins.
 

Similar Topics

Hi, Is it possible to scale the 4 to 20mA output of a Vegaflex 63 TDR Level Senor mounted on an inclined horizontal cylindrical diesel tank with...
Replies
5
Views
3,214
I am familiar with RSLogix, Concept, and Telepace, but have not used Unity Pro S until the past few weeks and have a few issues I have not been...
Replies
2
Views
9,699
Hello All!! I am new to the forum and have seen alot of good answers so far, but I have not been able to resolve the issue I am having. :mddr...
Replies
9
Views
4,220
Hello. New to Unity and had a couple quick questions. Can a Modicon M340 output to a small multiline LCD screen and not a full HMI?
Replies
4
Views
940
Greetings, I'm new at PLC programming, but good a logic - so I thought. I've inherited a PLC system, which is presently operating in the field...
Replies
6
Views
2,449
Back
Top Bottom