Hello everyone,
I'd like to change the color of a led in my panel related to the data received from CAN.
More exactly, I will receive some data from CAN and the color of the led will be green is value is inside the interval otherwise the led will be red. I know it is not possible to do this directly from Instruments Panel that's why I'd like to do it with a macro.
Is it possible to execute a specific VBS macro only when data from a specific CAN ID is received ? If yes, how ?
That would be wonderful, because in this case I could easily control the data's value.
Thanks in advance for your time.
Best regards.
Execute macro when received some data
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Execute macro when received some data
If you use the LED you could define a color on value and a color off value. If you need more as 2 values to set a color of a LED, you also could use the Bitmaplist.
The Bitmaplist could handle n-simple pictures (for example use a circle for a LED).
The Bitmaplist have a Property called Value
If you need more information, you also could contact us per E_mail --> suport[at]peak-system.com
The Bitmaplist could handle n-simple pictures (for example use a circle for a LED).
The Bitmaplist have a Property called Value
So it is easy to create your own LED with changing colours depending on the Signal Value without use a VBS Macro.Sets the threshold value for the currently selected bitmap. If the value of the Signal that was linked to the Bitmap List reaches this threshold value, then the selected bitmap is displayed in the Bitmap List.
No - this is not possible with the VBS or Std-Macros. You could use the PE6 CallBack Interface DLL Option to create such a function by your own, but the workload is much higher as use the Bitmap List.Is it possible to execute a specific VBS macro only when data from a specific CAN ID is received ? If yes, how ?
If you need more information, you also could contact us per E_mail --> suport[at]peak-system.com
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Execute macro when received some data
Thanks for you fast reply,
Bitmap List seems to be interesting, but there is something I don't understand. When I am editing the Bitmap Item, it is "Signal Value" and not "Signal Threshold". Even though it is named "Signal Value", is it really talking about a threshold ?
Bitmap List seems to be interesting, but there is something I don't understand. When I am editing the Bitmap Item, it is "Signal Value" and not "Signal Threshold". Even though it is named "Signal Value", is it really talking about a threshold ?
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Execute macro when received some data
The value is used to "switch" from Bitmap x to Bitmap y. there is no hysteresse included.It is the limit that the value must reach, to change the bitmap.
Value ----> Bitmap
0 --> LED_Off.bmp
15 --> LED_A.bmp
25 --> LED_B.bmp
45 --> LED_C.bmp
65 --> LED_D.bmp
70 --> LED_C.bmp
90 --> LED_B.bmp
100 --> LED_A.bmp
up to 14 --> LED_Off
From 15 to 24 --> LED_A
From 25 to 44 --> LED_B
From 45 to 64 --> LED_C
From 65 to 69 --> LED_D
From 70 to 89 --> LED_C
From 90 to 99 --> LED_B
Higher 100 --> LED_A
Value ----> Bitmap
0 --> LED_Off.bmp
15 --> LED_A.bmp
25 --> LED_B.bmp
45 --> LED_C.bmp
65 --> LED_D.bmp
70 --> LED_C.bmp
90 --> LED_B.bmp
100 --> LED_A.bmp
up to 14 --> LED_Off
From 15 to 24 --> LED_A
From 25 to 44 --> LED_B
From 45 to 64 --> LED_C
From 65 to 69 --> LED_D
From 70 to 89 --> LED_C
From 90 to 99 --> LED_B
Higher 100 --> LED_A
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Execute macro when received some data
Ok I see. Finally, it is possible to "simulate" an hysteresis:
Value ---> Bitmap
0 --------> Led_red.bmp
85 --------> Led_green.bmp
170 --------> Led_red.bmp
This is just an example, but led will be green between 85 and 169
Thank you so much for your help
Best regards
Value ---> Bitmap
0 --------> Led_red.bmp
85 --------> Led_green.bmp
170 --------> Led_red.bmp
This is just an example, but led will be green between 85 and 169
Thank you so much for your help
Best regards