Importing a tab delimited file for message text
- sgibsonhmc
- Posts: 8
- Joined: Wed Nov 13, 2013 9:14 am
Importing a tab delimited file for message text
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
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
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: Importing a tab delimited file for message text
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!
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.
![Smile :)](gif/icon_e_smile.gif)
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
Software Engineer
Enovation Controls
- sgibsonhmc
- Posts: 8
- Joined: Wed Nov 13, 2013 9:14 am
Re: Importing a tab delimited file for message text
"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.
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
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.
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
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: Importing a tab delimited file for message text
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.
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
![Wink ;)](gif/icon_e_wink.gif)
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 13 times
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls
- sgibsonhmc
- Posts: 8
- Joined: Wed Nov 13, 2013 9:14 am
Re: Importing a tab delimited file for message text
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) 3. pressed the "+" button to add another enumeration and the 400 changed to 255 (second pic) 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) 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.
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) 3. pressed the "+" button to add another enumeration and the 400 changed to 255 (second pic) 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) 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
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: Importing a tab delimited file for message text
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!
Looks as though you have a plan! Keep up the good work!
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls