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.
How to put a digit in a specific tag position
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: How to put a digit in a specific tag position
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#.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: How to put a digit in a specific tag position
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.
Thanks.
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: How to put a digit in a specific tag position
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.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: How to put a digit in a specific tag position
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?
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
Any sugestion?
Re: How to put a digit in a specific tag position
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
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
- Attachments
-
- Project1.zip
- iX Dev 2.0 V.482
- (26.37 KiB) Downloaded 860 times
Re: How to put a digit in a specific tag position
Thanks JohnCZ. I'll try this solution, but i'm not sure if this works for me.