Label Printing from ignition using Videojet 9550 with Zpl over TCP/IP

Hi everyone,
I want help with printing labels from ignition using Videojet 9550 with Zpl over TCP/IP.
If anyone has worked with Videojet printers before within ignition, can you please provide me with a step by step guide. I've tried a lot of things that I found on this forum, but to no avail. I'm not sure if I'm missing a step here. Please help!
Some of the solutions that I've tried are below:

I've also tried adding the labeler as a TCP driver under OPC devices and tried to write the ZPL code to its "message" tag.

On the labeler side, I used their configuration software called "Clarity Config" and worked with their tech support to properly configure it to receive Zpl code.

I'm not sure what's missing here, so any help would be appreciated!

I took a quick look at the manual. What is the ZPL emulation settings?

This is the ZPL Emulation setting:

Apart from that I've set Remote Access to "Yes", and Print Mode to "Select only (don't use database)"

If you're using the example I posted, try removing the try/except portions and see if it generates an error.

1 Like

Thanks @JordanCClark ,will do. Meanwhile, I downloaded drivers for the videojet 9550 printer and added the labeler as if it were a regular printer on my laptop. Then I tried printing test pages from windows, but its not printing anything. So I think that could be the issue. Running some more tests, will update you soon.

Another question. I saw this post here where it says you can print to Zebra using HTTPS:

Do you think the same will work for Videojet?Maybe a code like so:

#assuming i have the printerIP and zpl code
# Create an Http Client Object
client = system.net.httpClient()
# Send the command
response = client.post('http://%s:9100/pstprnt' %printerIP, data=zpl)
statusCode = response.getStatusCode()

Assuming you have printer IP and ZPL code, try this. You may have to try different socket parameters depending on your system. This is probably not correct based on your original requirements but could work?

import socket
printerName = # (printer IP or name goes here)
label = # (ZPL code goes here)
labelBytes = bytes(label)
mySocket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
port = 9100
mySocket.connect((printerName,port))
mySocket.send(labelBytes)
mySocket.close()

Hi Bushmatic,
Apologies for the late response. I tried your code and unfortunately it hasn't worked. I've reached out to videojet's tech support to request further assistance.

Hello, Ukamani,
Could you please tell me if you were able to print a label from C#? My job seems to be sending, but the output is blank. I've attached the settings and code.

using System;
using System.IO;
using System.Net.Sockets;
using System.Text;

class Program
{
static void Main(string
 args)
{
string printerIp = "10.118.4.200"; // Replace with your printer's IP address
int port = 9100; //3001

    // Example ZPL code to print a simple label
    string zplCode =
        "^XA^FO10,10^A0N,100,100^FDhello World^FS^XZ"; // End Format

    try
    {
        SendZplToPrinter(printerIp, port, zplCode);
        Console.WriteLine("ZPL code sent successfully!");
    }
    catch (Exception ex)
    {
        Console.WriteLine($"An error occurred: {ex.Message}");
    }

    Console.ReadKey();
}

static void SendZplToPrinter(string ipAddress, int port, string zplData)
{
    using (TcpClient client = new TcpClient())
    {
        // Connect to the printer
        client.Connect(ipAddress, port);

        // Get a stream for writing data
        using (NetworkStream stream = client.GetStream())
        {
            // Convert the ZPL string to bytes
            byte[] bytes = Encoding.ASCII.GetBytes(zplData);

            // Send the bytes to the printer
            stream.Write(bytes, 0, bytes.Length);
        }
    }
}

}

There's no C# in Ignition. Wrong website?

2 Likes

Is FT Optix leaking?

1 Like