PV780 Angel Script
- Dai Uematsu
- Posts: 30
- Joined: Thu Sep 09, 2010 8:56 pm
PV780 Angel Script
Our customer is now trying to make a list with container Widget by Angel Script and is facing with some issues as attached. Please review the attached and tell me how to manage these.
Thank you,
Thank you,
- Attachments
-
- 150727 PV780 Scripting.docx
- (50.57 KiB) Downloaded 37 times
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: PV780 Angel Script
Hello Dai Uematsu,
There are several topics in this forum about lists and string/text processing. The topic found here viewtopic.php?f=7&t=1033 has a simple demo config using a list and some strings variables.
There is a similar topic here viewtopic.php?f=7&t=1134&p=3110&hilit=list#p3110. It has two demo configs.
There are numerous example configs with lists and display widgets in the Standard and Example Configurations forum here viewforum.php?f=26, look in the PowerVision 2.7 topics.
There are some topics about converting numbers to strings. This topic viewtopic.php?f=7&t=1042&p=2759&hilit=ascii#p2759 is one of the topics and it points to another one.
Hope I have addressed all of the items in your document. If I missed something or you have more questions, I'll be glad to help.
There are several topics in this forum about lists and string/text processing. The topic found here viewtopic.php?f=7&t=1033 has a simple demo config using a list and some strings variables.
There is a similar topic here viewtopic.php?f=7&t=1134&p=3110&hilit=list#p3110. It has two demo configs.
There are numerous example configs with lists and display widgets in the Standard and Example Configurations forum here viewforum.php?f=26, look in the PowerVision 2.7 topics.
There are some topics about converting numbers to strings. This topic viewtopic.php?f=7&t=1042&p=2759&hilit=ascii#p2759 is one of the topics and it points to another one.
Hope I have addressed all of the items in your document. If I missed something or you have more questions, I'll be glad to help.
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls
- Dai Uematsu
- Posts: 30
- Joined: Thu Sep 09, 2010 8:56 pm
Re: PV780 Angel Script
Dear Sara,
I am sorry for my delay in responding. Would it be possible for you to provide me references or explanations on each item in my initial question file posted at first? I am not familiar with the PowerVision and am not sure which examples and references you provided will help the questions my customer made.
Thank you,
I am sorry for my delay in responding. Would it be possible for you to provide me references or explanations on each item in my initial question file posted at first? I am not familiar with the PowerVision and am not sure which examples and references you provided will help the questions my customer made.
Thank you,
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: PV780 Angel Script
Hello Dai Uematsu,
I am attaching a compressed file that includes a configuration specific to the document in your initial post. The document with my comments are also in the attached file.
The comments should point to the specific functions in the scripts that provide examples to assist you and your customers.
Please let me know if you need continued assistance with this.
I am attaching a compressed file that includes a configuration specific to the document in your initial post. The document with my comments are also in the attached file.
The comments should point to the specific functions in the scripts that provide examples to assist you and your customers.
Please let me know if you need continued assistance with this.
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls
- Dai Uematsu
- Posts: 30
- Joined: Thu Sep 09, 2010 8:56 pm
Re: PV780 Angel Script
Hello Sara,
Our customer informed me today that they were able to resolve all their issues with the sample configuration you provided. Thank you very much for your support.
Have a good day!
Best regards,
Our customer informed me today that they were able to resolve all their issues with the sample configuration you provided. Thank you very much for your support.
Have a good day!
Best regards,
- Dai Uematsu
- Posts: 30
- Joined: Thu Sep 09, 2010 8:56 pm
Re: PV780 Angel Script
Hello,
I had an additional question from the same customer about the CanInvalid function. They would like to determine if CAN signal is valid/invalid with the function below, but it did not work as expected. The function always returns true(EMG=1). Even when CAN signal is disconnected, no change was made. Please let me know how they can accomplish the behavior they want.
----------
bool CanInvalid( uint variableID )
Returns if a variable can be marked as invalid.
----------
----------
if( CanInvalid(VariableIDs.J1939_IO_01) ){
EMG = 1;
} else {
EMG = 0;
}
----------
Thank you,
I had an additional question from the same customer about the CanInvalid function. They would like to determine if CAN signal is valid/invalid with the function below, but it did not work as expected. The function always returns true(EMG=1). Even when CAN signal is disconnected, no change was made. Please let me know how they can accomplish the behavior they want.
----------
bool CanInvalid( uint variableID )
Returns if a variable can be marked as invalid.
----------
----------
if( CanInvalid(VariableIDs.J1939_IO_01) ){
EMG = 1;
} else {
EMG = 0;
}
----------
Thank you,
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: PV780 Angel Script
Hello Dai Uematsu,
If I understand correctly, I would recommend that your customer use the return value from the smRead() function. The help for the smRead() function found on the Function Reference tab explains what the return values are.
In order to get the value stored in VariableIDs.J1939_IO_01, they must read the VariableIDs.J1939_IO_01 into a local variable.
From your example, I assume that EMG is a database variable.
As you and your customer know, the CAN and MODBus variables have a 5 second delay (default) before they will go invalid. This is configurable and may be changed by the developer.
If I understand correctly, I would recommend that your customer use the return value from the smRead() function. The help for the smRead() function found on the Function Reference tab explains what the return values are.
In order to get the value stored in VariableIDs.J1939_IO_01, they must read the VariableIDs.J1939_IO_01 into a local variable.
From your example, I assume that EMG is a database variable.
Code: Select all
double tempVal;
if (smRead(VariableIDs.J1939_IO_01,tempVal))
smWrite(VariableIDs.EMG , 1);
else
smWrite(VariableIDs.EMG , 0);
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls