9/14/2012 9:31 AM | |
Joined: 3/14/2008 Last visit: 9/11/2024 Posts: 2095 Rating:
|
Hello, I want to address a datablock with a UDT structure. The UDT has less than 32 bools, four ints, 2 reals.. I already did the following: In SCL I put in a variable input: VAR_INPUT motor :udt30; END_VAR Now I can compile and in FC I can connect a motor (1,2,3) with db8.motor 1, db8.motor2. How can I access the variables in the udt? For example to set the speed of the motor1. I want to say: speed_real := motor.PV; addressing PV variable in the udt. In the examples, I see that they declare a UDT and a datablock in the scl program, but I already did that in datablock editor. Do I need to do that specifically in SCL? |
Last edited by: Oreca at: 9/17/2012 9:44 AMLast edited by: Oreca at: 9/14/2012 5:03 PMLast edited by: Oreca at: 9/14/2012 9:37 AMIf I could help you, you can use the RATE button. Thank you. |
|
Follow us on