Click here to Skip to main content
14,697,269 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
to read/write tag of Intouch in VB.NET C#
do we required to install wonderwaretoolkits??
where will be getting this toolkit??
now where to write this code??
Do Visual Sudio there in wonderware setup or in toolkit??
How to call the code in Wonderware project???
toolkits function will be able to read/write the value??
Which refrences need to be added??

m having ASCII printer .
The printer code is in C#. 
M using Wonderware 2014.
i got wwheap.dll, ptacc.dll, Incouch.vb & ptacc.vb
i copied both dll & .vb files in project Folder

Please reply ASAP..waiting for ur reply..


What I have tried:

i m unable to use
string SB = null;
Intouch IntouchToolkit = default(Intouch);
IntouchToolkit = new Intouch(0, 0);
SB = IntouchToolkit.ReadString("SBuffer", 132);


Error is on Intouch
Posted
Updated 27-Mar-17 23:59pm
Comments
Richard MacCutchan 28-Mar-17 4:24am
   
Error is on Intouch
And we are expected to guess what that error is?

If you have not installed the toolkit then it will definitely not work.
Member 11810225 28-Mar-17 5:30am
   
Can you provide me link to download toolkit??
Richard MacCutchan 28-Mar-17 5:37am
   
Why can you not go and look for yourself?
Ralf Meier 28-Mar-17 6:14am
   
Many years ago I worked also with Wonderware for Machine-Visualisation.
I remember that they have a very good helpdesk - so I would suggest you asked all this questions you have to them.
I'm very sure that they could help you.
I'm also sure, that they can tell you if you need this Toolkit and how much it (perhaps) cost ...

1 solution

Can you provide me link to download toolkit??

this is my code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//using System;
//using System.Text;
using System.Net;
using System.Net.Sockets;
using InTouchTagDictionaryLib;
using InTouchMultiTagDictionaryLib;
using INTOUCHPROXYPACKAGESERVERLib;
using INTOUCHTAGBROWSERLib;
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using aaGRAccessApp;
//using InTouchTagDictionaryLib;

using WWAPPINTLib;
using WWANIMATIONLib;
using WWAPPCNTXLib;
using WWPROVIDERREGLib;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main()
        {
            string SB = null;
           Intouch IntouchToolkit = default(GRAccessApp);
            IntouchToolkit = new GRAccessApp();
            SB = IntouchToolkit.ReadString("SBuffer", 132);
             sendToPrinter("10.1.10.40", "GEA AUTOMATION", 9100);  
        }
             
            public static Boolean sendToPrinter(String server, String message, Int32 port)
        {
            string hexOutput = "";
            try
            {
                string commandStart = "1b 4f 45 30 30 30";// 31 34"; // Start command
                string commandEnd = "04"; // End command
                string input = message;
                string messageLength = input.Length.ToString();
                input = messageLength + input;
                string hexString = "";
                char[] values = input.ToCharArray();
                foreach (char letter in values)
                {
                    // Get the integral value of the character.
                    int value = Convert.ToInt32(letter);
                    // Convert the decimal value to a hexadecimal value in string form.
                    hexOutput = String.Format("{0:X}", value);
                    hexString = hexString + hexOutput + " ";
                    Console.WriteLine("Hexadecimal value of {0} is {1}", letter, hexOutput);
                }
                input = commandStart + " " + hexString + commandEnd;
                Console.WriteLine(input);
                byte[] data = input.Split().Select(s => Convert.ToByte(s, 16)).ToArray();
                TcpClient client = new TcpClient(server, port);
                NetworkStream stream = client.GetStream();
                stream.Write(data, 0, data.Length);
                Console.WriteLine("Sent: {0}", message);
                data = new Byte[256];
                String responseData = String.Empty;
                Int32 bytes = stream.Read(data, 0, data.Length);
                responseData = System.Text.Encoding.UTF8.GetString(data, 0, bytes);
                Console.WriteLine("Received: {0}", responseData);
                // Close everything.
                stream.Close();
                client.Close();
 
            }
            catch (ArgumentNullException e)
            {
                Console.WriteLine("ArgumentNullException: {0}", e);
                return false;
            }
            catch (SocketException e)
            {
                Console.WriteLine("SocketException: {0}", e);
                return false;
            }
 
            return true;
        }


        }
    }
   
Comments
Patrice T 28-Mar-17 5:08am
   
Use Improve question to update your question.
So that everyone can pay attention to this information.
And delete this non solution
Richard MacCutchan 28-Mar-17 5:21am
   
How can you be trying to use this toolkit if you have not installed it on your system, and you do not even know where to download it from?
Member 11810225 28-Mar-17 21:03pm
   
m having Visual Studio installed in my PC..
In that m trying this ..but m not getting exact reference to be added to use this Function
[
Intouch IntouchToolkit = default(Intouch);
IntouchToolkit = new Intouch(0,0);
SB = IntouchToolkit.ReadString("SBuffer", 132);
]
on keyword intouch i m getting this error
Error 5 The type or namespace name 'Intouch' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Administrator\Documents\Visual Studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\Program_00.cs 37 13 ConsoleApplication1

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900