Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- Crestron
- Messages
Search
Re: Analog to hex to Serial
I found this in the SIMPL+ Programming Guide
toggle quoted message
Show quoted text
Using SIMPL vs. SIMPL+ SIMPL+, while exciting and powerful, does present the programmer with somewhat of a dilemma, namely, when to program in SIMPL and when in SIMPL+. The answer of course is not cut-and-dry, and just about any task can be accomplished entirely in one language or the other. However, the true power of Crestron control system programming is unleashed when the strengths of both environments are harnessed simultaneously. First, almost every program to be written will have some elements of SIMPL. Any time a button is needed to act as a toggle, or it is necessary to interlock a group of source buttons, it is generally simpler to handle these tasks with SIMPL. SIMPL+ is advantageous for more complex and algorithmic tasks, such as building complex strings, calculating checksums, or parsing data coming from another device. In addition, complex decision-making, especially when dealing with time and date, is generally much easier to handle in SIMPL+. Finally, data storage and manipulation may be better suited to SIMPL+ than to SIMPL (though many SIMPL programs have been written to do these chores). Of course, ultimately the decision as to how to program is up to the individual. Personal preference certainly comes in to play. --- In Crestron@..., "Chip" <cfm@...> wrote:
|
Re: Analog to hex to Serial
Thanks Chip,
toggle quoted message
Show quoted text
I didn't knew that Simpl+ was much more processor consuming. Do you have any idea of the reason? Is there any whitepaper wrote about it? Thanks --- In Crestron@..., "Chip" <cfm@...> wrote:
|
Re: Analog to hex to Serial
I think these exercises are valuable to familiarize yourself of the symbols in Simpl and actually how very powerful they can be. Same goes with S+, doing things in that environment which are easier done in Simpl is a good learning practice.
toggle quoted message
Show quoted text
--- In Crestron@..., "javiermazon_com" <javier@...> wrote:
|
Re: Analog to hex to Serial
Chip
Some of us don't mind spending some extra time in an effort to avoid taxing the processor with S+ swaps, especially if there's potential for them to happen rapidly.
toggle quoted message
Show quoted text
I didn't look closely at the OP's question, but if the ultimate use of the code is for something like parsing feedback of a volume control - a value that can change many times per second depending on the gear - then it's (IMHO) an excellent reason to avoid S+ if possible. There's always a debate about "Oh, this system is small, it's okay to use S+ here 'cos there's not much else going on and there's no way it's going to put excess load on the processor" - but again, IMHO, this goes into a "best practice" thing. If you have the time, (and I've been guilty of using S+ to make a last-minute request happen in short period of time) why not make a block of code in SIMPL that works well, and if you need it in the future you don't have to worry about dropping it into the program that might be for a much larger system that you need to make sure code is as streamlined as possible for... - Chip --- In Crestron@..., "javiermazon_com" <javier@...> wrote:
|
Re: Analog to hex to Serial
I forget about hex need. You're right.
toggle quoted message
Show quoted text
I was pointing at S+ as I can't see why someone would want to avoid it. --- In Crestron@..., "erikm_101" <erikm101@...> wrote:
|
Re: Analog to hex to Serial
Andy Maxey
Wow! Thanks for all of the suggestions and examples. I'm going to spend some time going over everyone's ideas and see what I can make sense of. I already have it working using an equ and sio, but like witmarquzot said, it's not very elegant, plus I don't learn anything if I leave well enough alone. :)
toggle quoted message
Show quoted text
Andy On 4/23/12 8:43 PM, Andy Maxey wrote:
|
Re: Sleeping on inactivity
Marc Nield
Thanks for the responses; there's plenty to run with there. I am not using Crosspoints (looks complicated.....) I use buffers and interlocks.
toggle quoted message
Show quoted text
That said, I did just pick up a controllable power switch for pennies which works well, so maybe I need to give Crosspoints another look. marc On 24 Apr 2012, at 16:04, Lincoln King-Cliby <lincoln@...> wrote:
Or if you're using Crosspoints, use a pulse stretcher on the in_use. |
Re: Sleeping on inactivity
Or if you're using Crosspoints, use a pulse stretcher on the in_use.
toggle quoted message
Show quoted text
Pretty much everything in my source rack at home that can be turned off is on a relay-controlled outlet controlled this way... if the source is in use by a zone or being controlled from a touchpanel it's powered on. Five minutes after the last zone stops using it (or the last touchpanel stops controlling it) it gets turned off. -- Lincoln King-Cliby, CTS Sr. Systems Architect | Crestron Certified Programmer (Silver) ControlWorks Consulting, LLC V: 440.449.1100 x1107 | F: 440.449.1106 | I: Crestron Authorized Independent Programmer -----Original Message-----
From: Crestron@... [mailto:Crestron@...] On Behalf Of erikm_101 Sent: Tuesday, April 24, 2012 10:52 AM To: Crestron@... Subject: [Crestron] Re: Sleeping on inactivity If you are processing feedback, such as current track, artist, album, etc, perhaps you could use an AOS or SAWPULSE from one of those serials to retrigger? --- In Crestron@..., Marc Nield <nieldm@...> wrote:
------------------------------------ Check out the Files area for useful modules, documents, and drivers. A contact list of Crestron dealers and programmers can be found in the Database area. Yahoo! Groups Links |
Re: Sleeping on inactivity
erikm_101
If you are processing feedback, such as current track, artist, album, etc, perhaps you could use an AOS or SAWPULSE from one of those serials to retrigger?
toggle quoted message
Show quoted text
--- In Crestron@..., Marc Nield <nieldm@...> wrote:
|
Re: Sleeping on inactivity
An HMV will take a constantly High input, otherwise you will need an OSC with a period less than the RMV to keep it alive.
toggle quoted message
Show quoted text
Lindsay --- In Crestron@..., Marc Nield <nieldm@...> wrote:
|
Sleeping on inactivity
Marc Nield
Conscious of the price of electricity these days I want to put my Mac Mini (music server) to sleep after x minutes of inactivity.
I am using an RMV and Dan Mulroy's module to trigger an AppleScript to sleep the Mac, which is working fine with one glitch (unless I am totally misreading the documentation), namely it wants a button press of some sort of indicate activity and reset the timer. If music is playing there is no button press activity; for a while I was wondering why my music all of a sudden turns off...then it dawned on me that simply tying a "playing_FB" or other presses to an OR to indicate activity isn't quite cutting it. Is there a cleverer way of doing this other than using some sort of Variable Oscillator to keep sending a digital signal into the RMV to let it know something is going on? Or am I being a moron and missing the bleedin' obvious? Thanks Marc |
New file uploaded to Crestron
Hello,
This email message is a notification to let you know that a file has been uploaded to the Files area of the Crestron group. File : /Modules/Decimal To ASCII Hex.umc Uploaded by : l_codd <lindsayc@...> Description : Low or High byte, lower or upper case output, plus trigger output. You can access this file at the URL: To learn more about file sharing for your group, please visit: Regards, l_codd <lindsayc@...> |
Re: Analog to hex to Serial
Actually I wouldn't win. It is rather hard, but doable, to convert a value into ASCII Hex without using EQUs and INITs, and it requires a lot of offsetting, clamping and scaling with zero pass. A lot more symbols and not as easy as my earlier off the top of the head post suggested. I did build a bit of code to prove to myself that it could work, but it's not worth it, even to avoid using S+ if you've got a lot of value changes.
toggle quoted message
Show quoted text
Instead I wrote a module that takes a value and produces two ASCII Hex equivalent values. I went a step further and made it selectable for low or high byte, and for lower or upper case output, as well as producing a pulse output if the output values change for easy interface to an ATOS. Total, 13 symbols, not that that is important. I'll drop it in the files section in case someone has a need for it. --- In Crestron@..., "matt_rasmussen_2000" <mjrtoo@...> wrote:
|
Re: cuz 4.007.0004 <sigh>
Chip
I assumed you were on vacation!!! :)
toggle quoted message
Show quoted text
S'okay, my update experience was either a fluke, or perhaps something to do with the ancienticity (<- see what I did there?) of my bench Pro2... - Chip --- In Crestron@..., Jeremy Weatherford <jweather@...> wrote:
|
Re: Analog to hex to Serial
Chip
Man does my tongue hurt right now...
toggle quoted message
Show quoted text
- Chip --- In Crestron@..., "javiermazon_com" <javier@...> wrote:
|
Re: Analog to hex to Serial
erikm_101
The OP wanted to do this WITHOUT using S+. However, if he WAS using S+ the ITOA would not generate ascii psuedo-hex. For that, you would want ITOHEX, assuming also that no padding was required. If padding is required (ie the value inserted must be two bytes long) the using makestring is the appropriate way to go. But again, none of this matters since the OP wants Simpl code only.
toggle quoted message
Show quoted text
erik --- In Crestron@..., "javiermazon_com" <javier@...> wrote:
|
Re: cuz 4.007.0004 <sigh>
No, but it did throw hardware watchdog reboots because I didn't
compile my program with device DB v41... and it can't be downgraded without dropping to the monitor. I need to re-educate my installers about the difference between "latest" and "stable" firmware releases... In related news, I discovered that a recent change to my mail settings meant that Yahoo has been silently ignoring my messages for the last 10 days... in case anybody missed me. ;) On Tue, Apr 24, 2012 at 9:55 AM, Chip <cfm@...> wrote:
-- Jeremy Weatherford |
Re: cuz 4.007.0004 <sigh>
I just updated a PRO2 over Ethernet yesterday. I didn't have any problems
toggle quoted message
Show quoted text
retaining the IP information, but I did have to erase and reload the program before it would work. --- On Tuesday, April 24, 2012 at 9:56 AM, Chip wrote: |
Re: Analog to hex to Serial
It's such easier in S+...
toggle quoted message
Show quoted text
CHANGE Analog_Value { String$ = "!1PRS" + ITOA(Analog_Value) + "\x0D" } You could even make a module with parameters so whenever you want to do "string1"+ITOA+"string2" you can use same module just changing parameters... --- In Crestron@..., Andy Maxey <amaxey@...> wrote:
|
cuz 4.007.0004 <sigh>
Chip
Anyone else try this update over Ethernet to find the last step failed due to the previous step wiping out the Ethernet card/settings?
(Asks the guy with a serial cable draped across his lap) Doesn't look like the intermediate cuz that gets loaded even *supports* Ethernet. Either I'm just lucky, or this is one of those things that should have had a great big retina-burning READ BEFORE INSTALLING type warning... - Chip |
to navigate to use esc to dismiss