I am working in Workvisual 4.0.29.
I am programming some code in the 'Configuration and commissioning' workspace, in the sps.sub.
In the attachment you see that the compiler generates a warning at the line $RED_VEL = OvrSpd,
because a real value is assigned to an int variable.
This is normal since an 'implicit' conversion is done, and precision can be lost.
I just want to avoid the warning to appear. So I thought maybe there could some instruction that tells the compiler 'explicitly'
to convert the real value to an int value, so generation of a warning would not be necessary anymore
Posts by SimotionD410
-
-
Yes, I know,
but can you do an explicit conversion? -
I know I can put the value of a real variable into an int variable, and that an implicit conversion is then done.
But then you get a warning in Workvisual that precision might be lost.
Is there way to do explicit conversion, so you don't get the warning in Workvisual (orange colour underlined)? -
SkyeFire,
If in that code, already 3 global variables are assigned with the IO-values, then submit is halted for the 12ms IO-update, then the submit goes on,
the first 3 variables will be assigned old values, and the last 3 variables new values.
In case there was just a change on the plc side, the frame in the robot (composed from the variables) will be inconsistent with the data from the plc (mixed old and new data).
I was thinking about copying the received Inputs to outputs after having done the caculations. -
My main issue is that I want to send variables X,Y,Z and A as 32bit integers from plc to robot by profinet.
These X,Y,Z,A need to be multiplied by 100 and then converted to real in the robot, and then inserted in a frame variable. This frame will be used for a motion.
When there is a start command for a motion, I want to be sure that X,Y,Z,A are consistent, so not X and Y from an older plc cycle and Z and A from the last plc cycle, otherwise the frame variable would not be correct.
In the SPS I could get a problem if SPS is stopped in a line of code in the middle of where I do the conversions. Then I get old and new variables.
But I suppose I could have the same if I do it in the robot interpreter?
But I need complete certainty about the consistency. -
Am I right that the instruction pointer of the submit cycle can be 'anywhere' when an update of the IO-variables (from the Profinet configuration, where the robot is a PN device of the Siemens plc) occurs?
What concerns the robot interpreter, if I have several consecutive lines of code where I do a transfer of an IO variable (PN communication with Siemens plc) to a global variable, it is possible that In the firste line of that code the global variable is assigned with a value of the plc that is older then for the last line of that code? -
The system variables manual is not completely clear to me about '$POS_ACT'.
Is this always the actual position related to tool0 and base0, no matter what the actual tool and base are?
I finally want the actual position related to the actual base and tool. If I have the position related to tool0 and base0, can I transform it to what I want with the geometrical operators in the SPS program? -
Or, to make my question more specific to what I intend to do now :
In the submit interpreter I will have ten consecutive lines of code where I convert the IO of the first variable to a real variable, then the second, third, onto the the tenth variable. Can I be sure if I have a new converted value in the last variable (last line of code in sps) that al the other nine variables will have the last updated status to (updated value from Siemens plc)? -
I have KRC4 KSS 8.3.27 that is a profinet device of a Siemens S7 1500 plc that is profinet controller.
The datablok in the Siemens is sent as one consistent unit to the KRC4 (the whole datablok should be sent in one and the same PN cycle to the robot).
In the submit interpreter, I read in the IO of the communication with the Siemens.
Now I am concerned about the synchronization between the submit cycle and the update of the data by Profinet.
For instance I have ten Dint variables (32 bit integer) in the Siemens that I send to the robot.
I in a certain line in the submit interpreter I read in these ten variables, will they all be of the same PN cycle?
For instance, in the Siemens at moment 1 all ten variables are 0, at moment 2 in one plc cycle they are written with value 999. Can I be sure that all the ten variables in the the submit interpreter will be at 999 in the same submit interpreter cycle?
Is a submit interpreter cycle always executed from begin to end and never interrupted somewhere in the middle?Thanks
-
Could the 0 value be because the SPS can execute more then once in the allowable 2 ms of 12 ms period?
-
I have KRC4 KSS8.3.34.
I want to program my own timers in SPS (because I need a lot of them).
For that I should want every scan of the SPS to increment an integer variable with the miliseconds of the last SPS scan cycle time. So my int variable would contain the elapsed time by accumulating the past sps cycle times.
For that I have a routine in SPS where every SPS cycle I write the elapsed milliseconds to an int variable.
After that write instruction I write the timer value to 0. I have now the impression that sometimes there is a 0 value in the integer variable, although always there is scan of the sps passed when the integer variable is written. Can I be sure after I write 0 to the timer value, that immediately the timer starts to increase? -
The robot has to move over an object with the photocell that will detect the object while moving.
The position of detection will be stored, so that the robot knows where to pick the object.
You mean that the standard ABB io-modules are capable of generating a trigger when an input goes from low to high (or the other way)?
Is there documentation about this? -
It is pretty important for me.
I am thinking about the strategy of moving already to a an endpoint, but at a point before (intermediary PTP movement) I fire a trigger where I check if the endpoint is ready or reacheable. If not I brake the movement and wait for release. If reachable the brake is not executed and there is a fluent motion.
This would be an alternative to moving to the intermediary point if the endpoint is not already reachable, and if it becomes reachable then moving finally to the endpoint.
Off course if during the first movement the endpoint becomes reachable, in the second scenario there is always a stop, in the first scenario not.
But I must be sure the deceleration is not more aggressive then a normal positioning to an endpoint. -
On IRC5 what possibilities are there to capture the actual position by a digital input, we should need an input that reacts realy fast, or
at the instant of detection of a fotocel we should need accurate capturing of the position. -
With KRC4 KSS8.2.27, is there a difference in the smoothness of movement if you end a ptp movement in the 'normal' way at its end point, compared to executing a brake statement in an interrupt routine?
I know the point of standstill will be different, but I am interested in the deceleration rate for a normal endpoint of ptp movement and a brake during movement. -
Additional question :
I want to use the enlarge range of axis one in robotstudio.
In the virtual flexpendant I have set in configuration- motion-arm-rob1-1 the upper joint bound and lower joint bound to 3.12 and -3.12 but after restart I can still not jog further then 170°.
What do I have to do make the range of axis 1 larger in the simulation in Robotstudio (additional to my first question). -
I have an IRB6700 robot and due to the construction of the cell, I need a maximum angle of axis 1 of more then 180°.
I see in documentation that maximum angle is 170°, but with option 220° is possible.
What does this option include : is it a combination of software and hardware? -
The system is KRC4 KSS8.27.
I have a program with multiple successive motion instructions in KRL code.
On multiple points there is approximation.
My impression is that in auto external the approximation works as expected.
But in T1-mode, it looks like the approximation does not work, the robot shortly stops at the end of of each movement.
I am not using the step by step mode, it is continuous.
I have set the parameter $stopnoaprox to true, but it never causes an error.
Is that possible, that motion (especially approximation) behaves different in T1 then in Auto Ext mode? -
We have KRC4 KSS 8.2.27
Now if we have some trouble in the robot cycle, we reset the program from the KCP (so it is set back to the first line of the main program, the rectangle of the robot program (with the 'R') is then lit yellow).
Is this possible to do it by a bit that comes from the plc communication? -
I have a workvisual project (KRC4) that is an 'upload' from a real controller.
On Office Lite the same type of robot is setup, only when I deploy my Workvisual project for transferring it to Office Lite, I get a message that the controller version in Workvisual is 8.3.33 and in Office Lite it is 8.3.18. The only option is to change my Workvisual controller version to 8.3.18.
But I would prefer to upgrade the version in Office Lite to 8.3.33, but I don't know how this is possible?