Instrument Panel Add-In: 3 position rocker switch
-
- Posts: 13
- Joined: Thu 28. Jul 2011, 19:02
Instrument Panel Add-In: 3 position rocker switch
Hi,
Haven't been on the forum for a couple of years, but am using the Peak tools almost daily! I do have a question. Is there a rocker switch for the Instrument panel that has 3 positions? I am working to create an Instrument panel to duplicate the functions of an industrial control pendant. The switches used on the pendant are 3 position. Up sets one bit in a CAN frame. Down sets a different bit in the same frame. Is there any way to duplicate this behavior with any of the switches presently included with the Instrument Panel? If not, what is suggested? I guess that another way to look at this is as a rotary selector switch, that sets different bits in a single CAN frame.
I'm looking forward to any advice on this.
Thanks,
Mark
Haven't been on the forum for a couple of years, but am using the Peak tools almost daily! I do have a question. Is there a rocker switch for the Instrument panel that has 3 positions? I am working to create an Instrument panel to duplicate the functions of an industrial control pendant. The switches used on the pendant are 3 position. Up sets one bit in a CAN frame. Down sets a different bit in the same frame. Is there any way to duplicate this behavior with any of the switches presently included with the Instrument Panel? If not, what is suggested? I guess that another way to look at this is as a rotary selector switch, that sets different bits in a single CAN frame.
I'm looking forward to any advice on this.
Thanks,
Mark
Mark W. Bevington
Maven Engineering
Yerington, NV, USA
e) mark@maveneng.net
c) 775.315.3088
Maven Engineering
Yerington, NV, USA
e) mark@maveneng.net
c) 775.315.3088
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Instrument Panel Add-In: 3 position rocker switch
No, a rocker switch with 3 positions is not available.
If you use PCAN-Explorer 5 you find attached a script that "simulate" the function of a rocker switch with 3 positions by using 3 single rocker switch which are XOR combined.
Also a Signal with 3 Values could be use (define signal value from 1 to 3) and use it with a DIAL
If you use PCAN-Explorer 5 you find attached a script that "simulate" the function of a rocker switch with 3 positions by using 3 single rocker switch which are XOR combined.
Also a Signal with 3 Values could be use (define signal value from 1 to 3) and use it with a DIAL
- Attachments
-
- RockerSwitch.zip
- PE5-Project - need Instr,Panel AddIn to run
- (4.3 KiB) Downloaded 547 times
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
- Posts: 13
- Joined: Thu 28. Jul 2011, 19:02
Re: Instrument Panel Add-In: 3 position rocker switch
Hi,
Thank you for the example. I ran it, but saw no associated CAN frame shown in the Receive/Transmit window. In looking at the SYMbol file, I note a frame has not been defined. I am not sure how to map the virtualvars into an actual CAN frame. This makes me realize that there maybe several different issues with what I am hoping to do.
Stepping back, maybe it would help if I provided a more complete perspective on what I am trying to do, and the problems that are preventing me from accomplishing it. I would like to simulate a industrial control pendant with an instrument panel. See attached picture of the pendant. Every switch & knob on the pendant are bit-mapped to a single CAN frame (ID = 0x1A1). In the actual system, the pendant connects wirelessly, and this frame is transmitted every 50 mS. For safety reasons, the master, that is being controlled by the pendant, goes into a "safe" mode if this frame is not received every 100 mS, i.e. the timeout for this frame is 100 mS.
Presently, there is only one item on my Instrument Panel that works. An indicator lamp that is driven by a bit in a frame that is coming into the pendant (0x1A3). I am seeing several different problems when I attempt to use the panel I have built.
1) I can not get the panel to transmit the associated frame with a repetition rate of 50 mS. At present it only seems to transmit the frame when a switch, or knob, position is changed. I have tried setting the "Update Frame Rate" setting in Panel properties to 20 Hz, and it has no effect. When the panel is in Run mode, I have tried selecting "Start Periodical Transmission" for various buttons, plus then tried selecting it for all of the buttons, and it does not work. I have no idea why this will not work. I need some help/direction on how to make this work.
2) When I toggle an individual switch, other switches toggle all by their selves, even though each is mapped to a different bit of the frame. It would seem that the Instrument Panel Add-in is not setting/resetting single bits properly. I would expect it to OR the appropriate bit in the CAN frame with a "1" when a switch is turned ON. Accordingly, I would expect it to AND the frame with all "1's", except for the bit that corresponds to the switch. The AND mask for this bit should be a "0". After looking at previous example I am thinking VirtualVars is a clue to solve this, but I do not yet see how.
I took a second PCAN-USB and used it to monitor the CAN bus connecting the pendant (Instrument Panel) to the target system, so I could see how the frame associated with the instrument panel changes when I toggled various switches. I observed that all of the corresponding bits stayed at zero and never change to a "1", when the corresponding switch is turned on! The only bytes in the frame which actually change are those associated with the dials, which are analog values.
I do not understand what the problem is. I have attached my project files for your review, and am hoping you can provide some suggestions as to what I am doing wrong, and/or have omitted.
Thanks in advance for your assistance.
Mark
Thank you for the example. I ran it, but saw no associated CAN frame shown in the Receive/Transmit window. In looking at the SYMbol file, I note a frame has not been defined. I am not sure how to map the virtualvars into an actual CAN frame. This makes me realize that there maybe several different issues with what I am hoping to do.
Stepping back, maybe it would help if I provided a more complete perspective on what I am trying to do, and the problems that are preventing me from accomplishing it. I would like to simulate a industrial control pendant with an instrument panel. See attached picture of the pendant. Every switch & knob on the pendant are bit-mapped to a single CAN frame (ID = 0x1A1). In the actual system, the pendant connects wirelessly, and this frame is transmitted every 50 mS. For safety reasons, the master, that is being controlled by the pendant, goes into a "safe" mode if this frame is not received every 100 mS, i.e. the timeout for this frame is 100 mS.
Presently, there is only one item on my Instrument Panel that works. An indicator lamp that is driven by a bit in a frame that is coming into the pendant (0x1A3). I am seeing several different problems when I attempt to use the panel I have built.
1) I can not get the panel to transmit the associated frame with a repetition rate of 50 mS. At present it only seems to transmit the frame when a switch, or knob, position is changed. I have tried setting the "Update Frame Rate" setting in Panel properties to 20 Hz, and it has no effect. When the panel is in Run mode, I have tried selecting "Start Periodical Transmission" for various buttons, plus then tried selecting it for all of the buttons, and it does not work. I have no idea why this will not work. I need some help/direction on how to make this work.
2) When I toggle an individual switch, other switches toggle all by their selves, even though each is mapped to a different bit of the frame. It would seem that the Instrument Panel Add-in is not setting/resetting single bits properly. I would expect it to OR the appropriate bit in the CAN frame with a "1" when a switch is turned ON. Accordingly, I would expect it to AND the frame with all "1's", except for the bit that corresponds to the switch. The AND mask for this bit should be a "0". After looking at previous example I am thinking VirtualVars is a clue to solve this, but I do not yet see how.
I took a second PCAN-USB and used it to monitor the CAN bus connecting the pendant (Instrument Panel) to the target system, so I could see how the frame associated with the instrument panel changes when I toggled various switches. I observed that all of the corresponding bits stayed at zero and never change to a "1", when the corresponding switch is turned on! The only bytes in the frame which actually change are those associated with the dials, which are analog values.
I do not understand what the problem is. I have attached my project files for your review, and am hoping you can provide some suggestions as to what I am doing wrong, and/or have omitted.
Thanks in advance for your assistance.
Mark
- Attachments
-
- SkatePendant.zip
- (263.95 KiB) Downloaded 532 times
Mark W. Bevington
Maven Engineering
Yerington, NV, USA
e) mark@maveneng.net
c) 775.315.3088
Maven Engineering
Yerington, NV, USA
e) mark@maveneng.net
c) 775.315.3088
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Instrument Panel Add-In: 3 position rocker switch
We will send you a changed PE5 project today... i don´t want to post it here, because i do not know if you like to share the result. So take a look in your mail account later on.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
- Posts: 13
- Joined: Thu 28. Jul 2011, 19:02
Re: Instrument Panel Add-In: 3 position rocker switch
Hi,
Any progress? Note, I do not think it is a problem if you post this on the forum. I tend to believe that it would be a good example that would most likely help quite a few others. The logo was photo-shopped out, plus the actual CAN frame definition does not match exactly (symbol positions have been scrambled).
Anyway, I'm looking forward to seeing what is possible here. In the interim, I am testing my product by toggling single bits on and off, using macros. One macro, to check each bit. It's a brute force technique, but is also how I used to do test vectors when I was doing gate array design.
Thanks you,
Mark
Any progress? Note, I do not think it is a problem if you post this on the forum. I tend to believe that it would be a good example that would most likely help quite a few others. The logo was photo-shopped out, plus the actual CAN frame definition does not match exactly (symbol positions have been scrambled).
Anyway, I'm looking forward to seeing what is possible here. In the interim, I am testing my product by toggling single bits on and off, using macros. One macro, to check each bit. It's a brute force technique, but is also how I used to do test vectors when I was doing gate array design.
Thanks you,
Mark
Mark W. Bevington
Maven Engineering
Yerington, NV, USA
e) mark@maveneng.net
c) 775.315.3088
Maven Engineering
Yerington, NV, USA
e) mark@maveneng.net
c) 775.315.3088
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Instrument Panel Add-In: 3 position rocker switch
Please find attached a PEAK-Panel Sample which use single Bit of a Databyte for every switch.
- Attachments
-
- Bitmap of running Panel and datastructure in Send Window
- Panel-Demo.JPG (133.14 KiB) Viewed 9260 times
-
- PEAK-Panel-Sample.zip
- PE5-Sample project using bit values for button information (need Instrument Panel AddIn)
- (249.05 KiB) Downloaded 532 times
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
- Posts: 13
- Joined: Thu 28. Jul 2011, 19:02
Re: Instrument Panel Add-In: 3 position rocker switch
Good Morning,
Thank you very much for the example posted. I've played with it a bit and it seems to work quite well. I noted that it had been viewed and downloaded twice, before I did, so am thinking it will definitely help others learn how to better use the Peak tools. I need to study the properties of the buttons yet, so as to understand why these work, and those I implemented on my panel didn't. That's my task....
You folks have a great product. I think the best way to grow your userbase is to continue in this same manner, helping users resolve issues, while expanding their knowledge in how to best use these tools.
Keep up the great work.
Thanks,
Mark
Thank you very much for the example posted. I've played with it a bit and it seems to work quite well. I noted that it had been viewed and downloaded twice, before I did, so am thinking it will definitely help others learn how to better use the Peak tools. I need to study the properties of the buttons yet, so as to understand why these work, and those I implemented on my panel didn't. That's my task....
You folks have a great product. I think the best way to grow your userbase is to continue in this same manner, helping users resolve issues, while expanding their knowledge in how to best use these tools.
Keep up the great work.
Thanks,
Mark
Mark W. Bevington
Maven Engineering
Yerington, NV, USA
e) mark@maveneng.net
c) 775.315.3088
Maven Engineering
Yerington, NV, USA
e) mark@maveneng.net
c) 775.315.3088