KB Van Rijn Coating - Printer¶
Terug naar klant: Van Rijn Coating
Printer Setup Instructions¶
1. Network Configuration¶
To configure the printer’s network settings:
1. Access Printer Menu:
Navigate to Settings → Interfaces → Ethernet.
2. Set Static IP:
- IP Address: Assign a static IP (e.g., 192.168.2.201 or 192.168.2.202).
- Subnet Mask: Use the default value.
- Default Gateway: Set to 192.168.2.253.
3. Port Configuration:
- Public WAN Port: Use 49001 (Printer 1) or 49002 (Printer 2).
- Private Internal Port: Use 9000 for both printers.
2. Printers Overview¶
| Name | IP Address | Public WAN Port | Private Port |
|---|---|---|---|
| Van Rijn Coating Printer 1 | 192.168.2.201 |
49001 |
9000 |
| Van Rijn Coating Printer 2 | 192.168.2.202 |
49002 |
9000 |
3. Firewall Rules (ACL)¶
Ensure the following IPs are whitelisted to allow communication with the printers:
- 91.99.216.112 (FL09PLO-LAR02 Productie server)
- 49.13.8.204 (FL09PLO-ACC01 Acceptatie server)
- 109.235.33.9 (FL06 Kantoor Flooris in Woerden)
Database: Printers Table¶
| id | name | host | port | default_printer | location |
|---|---|---|---|---|---|
| 1 | Van Rijn fabrieklabels | 109.235.37.44 |
49001 | 1 | VRC-Utrecht |
| 2 | Flooris printer | 192.168.10.155 |
9100 | 0 | Unknown |
| 3 | Van Rijn dozenlabels | 109.235.37.44 |
49002 | 0 | VRC-Utrecht-2 |
Usage Examples¶
Printing Stock Labels¶
\$quantity = 1;
\$printer = Printer::find(3);
\$labelPrinter = new LabelPrinter(\$printer);
\$stocks = Stock::query()
->where('id', '>', 491)
->where('current_weight', '>', 0)
->get()
->chunk(400)
->last()
->chunk(20);
foreach (\$stocks as \$chunk) {
foreach (\$chunk as \$stock) {
\$labelPrinter->printStock(\$stock->color, \$stock->finish, \$quantity);
sleep(5); // Prevent printer overload
}
sleep(10);
}
Printing Order Labels¶
\$printer = Printer::find(\$printerId);
\$order = Order::find(\$orderId);
\$labelPrinter = new LabelPrinter(\$printer);
\$labelPrinter->printOrder(\$order);
Additional Notes¶
- Rate Limiting: Use
sleep()to avoid overwhelming the printer. - Error Handling: Verify the printer is reachable and the socket connection is stable.
- Logging: All print commands are logged for troubleshooting.