Gazzr Posted April 27, 2007 Report Posted April 27, 2007 (edited) Could somebody tell me why the subroutine in my attached program does not return the expected result. Basically what I want to do is convert 2 numeric bytes from seperate locations into a string. but seperate the 2 numbers with a "-" once in the string. I have almost got it right, but the last step to transfer the string out of the subroutine and into a location doesn't seem to work.... Must be something and nothing, but it beats me...? Thanks in advance. combine_bytes_to_string.rar Edited April 27, 2007 by Gazzr Quote
504bloke Posted April 28, 2007 Report Posted April 28, 2007 (edited) Ill throw you a bone...... In your subroutine look at your local variable table Edited April 28, 2007 by 504bloke Quote
Gazzr Posted April 29, 2007 Author Report Posted April 29, 2007 I'm guessing that you mean look at the local variable table because LB2 is set to byte rather than string. But it doesn't let me select string.... I have no idea why though as the option is there in the drop down list. Quote
504bloke Posted April 29, 2007 Report Posted April 29, 2007 I dont think you can pass a string out which is why you cannot select string, as you have selected byte insted this is why your subroutine isnt working on the output. I have searced siemens help and can find no reference to it though. All i think you can do is forget the OUT and just put the string in a variable say VB230 or something, that works ok. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.