Generate 2D Barcode on PanelView

Steve Etter

Lifetime Supporting Member + Moderator
Join Date
Apr 2002
Location
Morristown, TN
Posts
965
Does anyone know a way to dynamically generate a 2D barcode on a PanelView screen? An Activex Control maybe? If such a method is out there, it eludes me.

Thanks.
Steve
 
How inventive do you want to get ?

When you say "2-D Bar Code", do you mean a QR code or Data Matrix or PDF417 or something else ?

Will it contain a URL or other string text ?

Does the contents of the barcode come from an entry object or tag on the PanelView Plus itself, or from a value in a PLC, or from an input device like a barcode scanner ?

Do you have a Windows CE 6 based PanelView Plus, or one of the more-modern PanelView Plus 7 Series B (that runs Windows 10 IoT), or even the PanelView 5000 ?
 
Last edited:
This would be a QR code and no, nothing like a URL. It is a PLC generated part ID string that has been laser marked on a part. The content will come directly from a PLC tag.

The PanelView is a brand new models, but I don't know specifically which level until I check it out tomorrow.

There will be no internet access.
 
You might be better off using Ignition though. That has in-built barcode generation: https://docs.inductiveautomation.com/display/DOC80/Perspective+-+Barcode

The PanelView is a brand new models, but I don't know specifically which level until I check it out tomorrow.

I vaguely remember reading recently that the newest PV+ models run Windows 10.

I wonder if you could install Ignition on one. I'd feel unbearably smug running Ignition on a PV+ :ROFLMAO:
 
I vaguely remember reading recently that the newest PV+ models run Windows 10.

I wonder if you could install Ignition on one. I'd feel unbearably smug running Ignition on a PV+ :ROFLMAO:

When AdvancedHMI was based on the Compact version of the .NET framework, I got it running on a PanelView +
 
Any chance you want to install a Raspberry Pi in there to be a helper ?

I got to thinking and I'm about 75% there with getting a Logix tag to show up on a PanelView Plus as a QR Code via the ME Web Browser Control and Node-Red.
 
I got 90% of the way there, and stalled because the Web Browser ActiveX is a pain on older PanelView hardware that I have around the test bench. In this screenshot it's running in Test Display mode in FTView 12.0 on Windows 7.

I have a Raspberry Pi running an ordinary headless RPi OS installation, with Node-Red installed, along with the EtherNet/IP client and the Image Tools nodes.

The Node Red program flow reads a DINT from a CompactLogix, and creates a QR code representing that number value, which is the only contents of a HTTP Response endpoint.

The Web Browser ActiveX reads a specific URL from the Raspberry PI, and it returns an HTML web page containing only the QR code as a *.png image.

QR_PVPlus.PNG
 
The ME Web Browser ActiveX is set with the URL field a literal string:

"http://192.168.1.3:1880/panelview"

The Refresh field is set for the system\BlinkSlow tag.

The Node-Red flow took some learning (I'd never used the HTTP endpoints or the Image node before today) but it's fairly straightforward.

QR_Flow.PNG
 
Hey Ken,
Why does my phone translate your QR Code different than the displayed value?
My phone also thinks its a phone number :)

QRCode.JPG
 
Nice catch !

It's a timing issue, because I just hacked this together as a proof of concept. There are several non-synchronized time-based parts of the process.

The source value is the lower 32 bits of the CompactLogix CST clock raw value, which is sampled in ladder logic to the CST_low32 tag by a 1 second repeating timer.

The PanelView is updating the Web Browser every second, based on its internal \BlinkSlow tag.

The PanelView is also reading the CST_low32 tag every 250 ms directly for the Numeric Display object, based on the Display update rate.

And the Node-Red flow is reading the value from the CompactLogix on a 1-second periodic basis that isn't coordinated with either of those other sampling rates.

If I was going to pursue this further, I would probably add the Logix tagname explicitly to the URL, and replace the EtherNet/IP tag reading node with a Python script to read a String tag from the CompactLogix. That could be tidily set up so that the data was refreshed only when the Update tag in the ME Web Browser connections changed state.
 
Last edited:
Node-Red really does earn its reputation as the Swiss Army Knife of IoT tools.

I've got a version of this function working on my Raspberry Pi that uses a query parameter in the ME Web Browser URL to pass the actual ControlLogix string tag name to Node-Red.

Node-Red then uses a Python shell to run a PyLogix (my first time, @Dustin !) routine to read the String tag that it will turn into a QR code.

It then creates the QR code, and returnes it as the HTTP response in PNG format, for the ME Web Browser to display on the PanelView.

The hardest part was figuring out how to maintain the continuity in Node-Red between the HTTP In endpoint and the HTTP Response endpoint. The Python Shell doesn't maintain the format of the Node-Red message, so I had to use a queueing buffer and stash the QR code string in a flow-scope variable.

In short: the FTView ME Web Browser sends a URL request to the Raspberry Pi:


Node-Red running on the Raspberry Pi takes that Logix tag name "QR_String", reads the contents from the ControlLogix using Python, converts the text to a QR Code, and returns it to the web browser for display in PNG format.

I realize that installing a little PC running Linux and some open-source software isn't the smoothest solution to every application, and certainly a more capable and open HMI could probably do this more easily and reliably.

But frankly this was kinda cool.

QR_Flow2.PNG
 
Last edited:

Similar Topics

Hello Friends, I am looking for a way to take my PID Output( it is the result of my PI Algorithm in Real format) and generate a PWM Signal in...
Replies
16
Views
2,520
Hi, I am trying to generate source file of OB1 including all dependent blocks. But i am getting a message which says-->>one or more blocks...
Replies
3
Views
1,256
Hello Everyone, I would like to know where to start when designing a HMI+PLC Allen Bradley based, that complies with CFR 21 PART 11, ALCOA...
Replies
4
Views
2,914
Hello, in iFix I want to do a boolean calculation with two values, and generate an alarm if the result is true. The calculation in my BL block...
Replies
3
Views
2,182
Hello, So in RSLogix 5K I would be used to doing the following: 1. Double click the left of the rung, to bring the rung text editor, will be...
Replies
4
Views
2,104
Back
Top Bottom