Page 1 of 1
How to put a digit in a specific tag position
Posted: Fri Jul 19, 2013 7:20 am
by Jesus
In the first way, sorry for my poor english.
I need to put a digit in a specific positon on string (or integer, but i think that is more viable do this in a string). For exemple, i have the tag String1, 6 char long, and i want to put a 1 in the position 3 of the string, and a 0 in the rest of positions (001000). Other exemple: I have the same String1, and i want to put a 4 in the 2nd position, and a 1 in positions 4 and 6. The rest of the string's charters are 0 (040101).
Thanks, and sorry other time for my horrible english.
Re: How to put a digit in a specific tag position
Posted: Fri Jul 19, 2013 10:38 am
by mark.monroe
You would have to use a C# script to do that. There should be a lot of examples online that show you how to parse and modify strings in C#.
Re: How to put a digit in a specific tag position
Posted: Mon Jul 22, 2013 1:46 am
by Jesus
Is posible, but i'm asking here because i'm need this for a Beijer Screen. I'm not a programmer, and i don't know C# language. Do you can help me?
Thanks.
Re: How to put a digit in a specific tag position
Posted: Mon Jul 22, 2013 8:19 am
by mark.monroe
Unfortunately we can only provide C# support if it relates to iX API function calls. What you want to do is C# specific and is not related to iX Developer. C# is a language that is supported by Microsoft. I would recommend that you go to a programming forum and ask how to parse strings there.
Stack Overflow is one such forum.
Re: How to put a digit in a specific tag position
Posted: Mon Jul 22, 2013 9:47 am
by Jesus
Ok, i have a question about iXDeveloper:
I have 6 buttons, and i need record in the same tag if any of this buttons was be presseds. But, in adittion, i need to record in the same tag other posible information (With other buttons). In others words, i need to record two types of informations in the same tag. My question is: I can do this in iXDeveloper without using a enormous chain of conditions?
Re: How to put a digit in a specific tag position
Posted: Wed Jul 24, 2013 8:42 am
by Jesus
Any sugestion?
Re: How to put a digit in a specific tag position
Posted: Thu Jul 25, 2013 3:10 am
by JohnCZ
Hi
you could use string as a format. Where every button will toggle diferent Tag 0 or 1 and then you could save these tags in your value. So you will have message [000000] and if someone push some button you will see it in message [001000] or [001001] ats. We use something similiar but only for I/Os
Re: How to put a digit in a specific tag position
Posted: Thu Jul 25, 2013 4:50 am
by Jesus
Thanks JohnCZ. I'll try this solution, but i'm not sure if this works for me.