Importing a tab delimited file for message text

Discuss issues and ideas you have to configuring displays with PowerVision
sgibsonhmc
Posts: 8
Joined: Wed Nov 13, 2013 9:14 am

Importing a tab delimited file for message text

Post by sgibsonhmc » Mon Jul 13, 2015 2:10 pm

Here's my situation, and I'm sure others have had this issue as well, so any help would be appreciated.

I am using a controller that can output many types of status messages by changing a number in one of the PGNs it outputs. I have a text file, tab delimited, of information about the encoding of the messages as well as a bit of text that gives info on each message. I would like to be able to import this file, or even just the text portions of it to Power Vision to prevent a bunch of copy/alt+tab/paste/alt+tab/repeat work.

I think the status messages could be triggered by the PGN directly or as enumerations or a variable, but i think the latter would be even more work.

If there is no way of importing a file like this, I would like to suggest this as a feature for future upgrades since my project uses several devices like the controller i mentioned and it took a while to use the copy/paste method on one of them on an earlier version of the system software.

I am using a PV780 (10-key) display with Power Vision 2.7.10475 (121/7/2014)

Thanks
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Importing a tab delimited file for message text

Post by stalley » Tue Jul 14, 2015 7:52 am

Hello sgibsonhmc,

Unfortunately, I don't think PowerVision Configuration Studio is able to do what you have described. Currently, we can use spreadsheets to copy/paste text to the DTC Setup and if you have captured CAN data with CANCapture, you can add database variables based on defined PGNs.

Since you have scripting available, could you read your file into a list, save the list on the display so that it would persist? It would only need to be read and saved again with a full-install. Scripting is far more fun than copy and paste. :)

Are your ECU's PGNs standard J1939 messages? How much of the information and data can be captured by using a network sniffing tool like CANCapture? Is the text message in the data of the PGN? What data is transmitted in the PGN?

We always want to consider ways to make PowerVision Configuration Studio easy to use and I thank you for your contribution to helping us toward doing just that. If you don't mind, I will move this over to the Request Features forum so it won't be forgotten.

Thank you!
Sara Talley
Software Engineer
Enovation Controls
sgibsonhmc
Posts: 8
Joined: Wed Nov 13, 2013 9:14 am

Re: Importing a tab delimited file for message text

Post by sgibsonhmc » Tue Jul 21, 2015 7:20 am

"Are your ECU's PGNs standard J1939 messages? How much of the information and data can be captured by using a network sniffing tool like CANCapture? Is the text message in the data of the PGN? What data is transmitted in the PGN?"

I'll try to answer these questions-

The device is a hydraulic control valve that uses J1939 controls. PGNs are PDU1 format. Its a brand new device with "some" documentation that I have not received to see how it actually replies to messages. I'm trying to get some programming out of the way before I get the valve in to speed up the project. This is a prototyping project, at least where some of the software is concerned.

The information sent on the PGN is a number, 1-608 with many gaps in the range, to represent the error. Call this an error code. There is also a power cycle count. I have a text file with error codes and text describing each error.

I tried using enumerations of a variable to set this up, but regardless of what data type I set up the variable as, Power Vision will not let me use a value for enumeration over 255.

This last item may be a flaw. If there is a 16 bit data type variable, shouldn't enumerations of said variable be able to increase over an 8 bit number?

As far as scripting goes, I'm not as familiar with scripting, other than basic, as I am with other types of programming. My background, as far as programming is concerned, is more in ladder logic, function block, and device specific programming of a/c and d/c drive systems.
sgibsonhmc
Posts: 8
Joined: Wed Nov 13, 2013 9:14 am

Re: Importing a tab delimited file for message text

Post by sgibsonhmc » Tue Jul 21, 2015 7:29 am

Update on my last post:

If I use the programming tab in Power Vision and create a variable, I can't give the variable selector values over 255. If I create a smart text object on a screen, I can use whatever number I type in.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Importing a tab delimited file for message text

Post by stalley » Tue Jul 21, 2015 3:42 pm

Hello sgibsonhmc,

Hmmm, I'm not sure that I understand what is going on. Maybe I am doing something wrong. In Programming, if I add a New Numeric Variable, then go to the Enumeration Values tab and start clicking on the + button on the right, I can add many over 255 (I got carpel tunnel from mouse clicking over 300 times ;) ) Is this what you are trying to do?

Enumeration Values over 255 will work on color displays, they don't on monochrome (PV350/380/MPC20...) but you are using a PV780 so it should work ok.

There isn't a way to read/import file data to a Smart Text Widget, you can't add the enumerations to it, which I thought you were trying to avoid the copy paste. I'm attaching a couple of examples that might help with getting some ideas about using a list to contain your error code data. There is another example to read and parse a file with string data. The file parsing example is a PV450, but you should be able to copy/paste across the configs, you could maybe export/import.

The configs are very simple, but they could be a start.

There are other demo configs with scripts to do many tasks scattered around the forum.
Attachments
DEMO - ReadWriteList.zip
List and String data file R/W.
(8.99 MiB) Downloaded 14 times
Sara Talley
Software Engineer
Enovation Controls
sgibsonhmc
Posts: 8
Joined: Wed Nov 13, 2013 9:14 am

Re: Importing a tab delimited file for message text

Post by sgibsonhmc » Wed Jul 22, 2015 7:10 am

See the attached pictures.

Here's what I did:

1. created a new variable in the programming tab, leaving all settings at default
2. typed "400" for the Selector Value for enumeration 4 (first pic)
1.PNG
First Pic
1.PNG (21.79 KiB) Viewed 165 times
3. pressed the "+" button to add another enumeration and the 400 changed to 255 (second pic)
2.PNG
Second Pic
2.PNG (22.81 KiB) Viewed 165 times
You can create Selector Values over 255 by using the plus button as long as they are sequential. I tried the same process above to give enumeration 256 a selector value of 400 and my selector value was once again changed when I added a new enumeration. (third pic)
3.PNG
Third Pic
3.PNG (24.62 KiB) Viewed 165 times
My values are non sequential so this problem shows up for all of my values over 255. Since my data skips from selector values 229 to 300 with no fault codes in between, all numbers over 255 cannot be entered unless I create many unneeded enumerations in the list.

I ended up using copy/paste for my data, its not so bad with multiple monitors, but I will check out your example later.

The behavior listed above doesn't happen if the enumeration selector values are entered from using a smart text widget in page designer.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Importing a tab delimited file for message text

Post by stalley » Wed Jul 22, 2015 7:41 am

Ya, kinda flaky. I'll log the issue so we can take a better look.

Looks as though you have a plan! Keep up the good work!
Sara Talley
Software Engineer
Enovation Controls