Search found 137 matches
- Mon Mar 12, 2018 6:57 am
- Forum: Application Development
- Topic: Failed to connect objects to data items
- Replies: 1
- Views: 3543
Re: Failed to connect objects to data items
Hi kkwon2, It's hard to answer specifics without seeing your project. The most likely cause is you had some control using a tag or some other external reference which was since deleted, hence the null reference. Try rebuilding your project rather than just using build to clean up the auto-generated ...
- Thu Mar 01, 2018 9:54 am
- Forum: Scripting
- Topic: Writing Continuous Modbus Registers
- Replies: 7
- Views: 10518
Re: Writing Continuous Modbus Registers
99bobster99, Getting a double word from a two words: ushort[] a = new ushort[2] { 1, 2 }; uint b; b = ((uint)(a[0])) | (((uint)(a[1])) << 16); Getting a bytes from a word: ushort a; byte[] b = new byte[2]; b[0] = (byte)(a & 0x00FF); b[1] = (byte)((a & 0xFF00) >> 8); Getting bit from word: (bitpositi...
- Wed Feb 28, 2018 2:32 pm
- Forum: Scripting
- Topic: Writing Continuous Modbus Registers
- Replies: 7
- Views: 10518
Re: Writing Continuous Modbus Registers
99bobster99, The answer is actually buried in the driver code :). To copy byte into lower byte of word: byte a; short b; b = (short)((b & 0xFF00) | (short)a); To copy byte into upper byte of word: byte a; short b; b = (short)((b & 0x00FF) | (((short)a) << 8)); To split double word into words: int a;...
- Wed Feb 28, 2018 8:52 am
- Forum: Scripting
- Topic: Writing Continuous Modbus Registers
- Replies: 7
- Views: 10518
Re: Writing Continuous Modbus Registers
99bobster99, How are you connecting to Modbus TCP server? Are you using iX built-in Modbus TCP master? I don't know how to manipulate built-in driver, but I can give you code to make your own driver with which you can do this. Hope this helps. using System; using System.Net; using System.Net.Sockets...
- Thu Feb 01, 2018 11:06 am
- Forum: Application Development
- Topic: How can I have access to background screen objects?
- Replies: 9
- Views: 15516
Re: How can I have access to background screen objects?
Andrea, I just got a chance to look at how iX compiles the Globals class. All screens are created as static IScreenAdapter which would explain why the code does not work. The code I wrote needs the screens being properties of the Globals class. Using System.Reflection you can create your own instanc...
- Fri Jan 12, 2018 10:47 am
- Forum: Application Development
- Topic: How can I have access to background screen objects?
- Replies: 9
- Views: 15516
Re: How can I have access to background screen objects?
You're right. I forgot base is only a keyword and thus can't be passed to functions. Where are you using this code? If it's from within the screen you can just pass "Globals.<background_screen_name>" for the background screen manually. If you want to do this programmatically, you would need to creat...
- Thu Jan 11, 2018 8:00 am
- Forum: Application Development
- Topic: How can I have access to background screen objects?
- Replies: 9
- Views: 15516
Re: How can I have access to background screen objects?
I'm assuming when you pass "screen" to your function you are passing "this". To extract the background screen so your function knows to ignore it, pass "base". If the object shows up in both this's and base's list you know it's in this's because it's in base's.
- Mon Jan 08, 2018 9:15 am
- Forum: Scripting
- Topic: How to Create Customized User Dialog Window/Popup
- Replies: 3
- Views: 6897
Re: How to Create Customized User Dialog Window/Popup
You can create a new screen and under general settings check Popup to convert the screen to a dialog. Leave Modal checked if you want to require the user to respond to the dialog before they can do anything else. Unchecking Modal will make the dialog more like a tool window. Once you sent the screen...
- Sat Dec 23, 2017 9:19 pm
- Forum: Controller Communication
- Topic: Modbus Slave Receive Timeout
- Replies: 2
- Views: 5683
Re: Modbus Slave Receive Timeout
What type of Modbus slave are you using RTU or TCP? I have one project with a Modbus TCP slave and I know SystemTagCommunicationErrors incremented and the error message window would appear when no master was connected unless the command line options was set to "XDNCW". Looking through the controller...
- Wed Dec 13, 2017 2:58 pm
- Forum: Tags
- Topic: Using 2 CAN channels tags to drive the same Gauge
- Replies: 2
- Views: 7495
Re: Using 2 CAN channels tags to drive the same Gauge
I'm not 100% certain what you are trying to do in your script, but, from the context, it seems you want a tag that gets the value from tag1 if CAN1 good, otherwise tag2. One way to do this would be to create a tag - for this example I will call this 'tag' that is script-controlled. Then you would cr...