naturephoenix
Member
Hi guys! Imagine you got taks someting like this:
You got 6 motors and under some conditions you have to start one of them. That "one of them" has to be choiced by user on HMI device. So if user enter number 5 then he wants that motor number 5 starts. All all motors have same conditions for start.
Here is not the problem how to resolve this task, problem is that I want to resolve it on this way...SO here is how my data looks like.
Motors.Start[1] //- motor 1 - DB4.DBX0.0
Motors.Start[2] //- motor 2 - DB4.DBX0.1
Motors.Start[3] //Start motor 3 - DB4.DBX0.2
Motors.Start[4] //- motor 4 -DB4.DBX0.3
Motors.Start[5] // '- motor 5 -DB4.DBX0.4
Motors.Start[6] //- motor 6 - DB4.DBX0.5
If user enter number 5 via HMI for example in variable n(n is INT data type) this wont work
Motors.Start[n]. This is what i am looking for, how to address my array dynamicly. I have read something about pointers ,but I
still dont know how to use them here.
YES i know how to resolve this in SCL but that's not an option.
STL and/or FBD are the options.
A condition1
A condition2
S Motors.Start[n]
You got 6 motors and under some conditions you have to start one of them. That "one of them" has to be choiced by user on HMI device. So if user enter number 5 then he wants that motor number 5 starts. All all motors have same conditions for start.
Here is not the problem how to resolve this task, problem is that I want to resolve it on this way...SO here is how my data looks like.
Motors.Start[1] //- motor 1 - DB4.DBX0.0
Motors.Start[2] //- motor 2 - DB4.DBX0.1
Motors.Start[3] //Start motor 3 - DB4.DBX0.2
Motors.Start[4] //- motor 4 -DB4.DBX0.3
Motors.Start[5] // '- motor 5 -DB4.DBX0.4
Motors.Start[6] //- motor 6 - DB4.DBX0.5
If user enter number 5 via HMI for example in variable n(n is INT data type) this wont work
Motors.Start[n]. This is what i am looking for, how to address my array dynamicly. I have read something about pointers ,but I
still dont know how to use them here.
YES i know how to resolve this in SCL but that's not an option.
STL and/or FBD are the options.
A condition1
A condition2
S Motors.Start[n]