As far as IO mapping goes, I'd steer personally steer clear away from connecting Globals to IO if possible (i.e. when not necessary). Your IO seems to be a part of a (repeatable?) machine. If it is a repeatable machine part, then makes sense to declare an FB (which the contains the repeatable machine code) and instance it and then hook that directly to the IO.
Good luck
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, an IO point can only be connected to a single variable. However, you can read from this single variable from several parts in the application. Plus there are other workarounds thinkable to overcome this.
Just some mock code (example) not to be taken too litteral
Hello,
I would like to ask for some help.
I get the below warning message.
[WARNING] v316_plc: DXP [Device: Local_IO]: C0373: 'Application.ST1.xSensorPresence' is no valid assignment target
I think that it is b/c of I assign a read_only (%IX0.) variable to a VAR_INPUT which has read and write access as well - am I right?
What should be an appropriate solution?
Btw, I would like to stick to the so-called array-instantiation of FBs.
Thanks for your help in advance.
Last edit: andras-mozes 2020-11-25
Where/how is 'Application.ST1.xSensorPresence' defined?
Hello,
I/O mapping to global variable, and it is an input.
Is 'Application.ST1.xSensorPresence' defined? Is ST1 a GVL? Post a screen cap of where it's defined.
Is 'Application.ST1.xSensorPresence' defined? Is ST1 a GVL? Post a screen cap of where it's defined.
Here you are. π
Hi,
As far as IO mapping goes, I'd steer personally steer clear away from connecting Globals to IO if possible (i.e. when not necessary). Your IO seems to be a part of a (repeatable?) machine. If it is a repeatable machine part, then makes sense to declare an FB (which the contains the repeatable machine code) and instance it and then hook that directly to the IO.
Good luck
Hello aliazzz,
would you mind providing an example.
I am newbie, but it sounds great and I would like to test it.
Thanks!
Last edit: andras-mozes 2020-12-08
Hello aliazzz,
would you mind providing an example.
I am newbie, but it sounds great and I would like to test it.
Thanks!
Last edit: andras-mozes 2020-12-08
Hello,
is it what you are meaning?
Correct, now you can instanciate multiple FB with the same repeatable code and still connect them to different IO.
Awesome! π
BTW, is multiple assignment possible?
I.e. I would like to link the same DXP to 2 different FB objects.
Last edit: andras-mozes 2020-12-08
No, an IO point can only be connected to a single variable. However, you can read from this single variable from several parts in the application. Plus there are other workarounds thinkable to overcome this.
Just some mock code (example) not to be taken too litteral
Last edit: aliazzz 2020-12-08
I see!
Thanks.
BTW, what does
1
mean inIn1
mean?I have noticed that in FB
RS
the property of RESET has a suffix likeRESET1
.Thanks for your support.
Last edit: andras-mozes 2020-12-08