¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io
Date

Re: Question on finding the number of defined array elements.

Matt
 

Right on, I might add that trying to not put someone down while
helping is a plus!



Over the years, I have programmed in many different languages
starting with assembler and moving up into what are called 4GL and
true Object Oriented languages. They each have their strong points
and their weaknesses. Each have places where they are the better
language for the usage. C was designed to be a higher level language
than assembler but still allow some of the power of assembler with
its pointers.

For some, programming languages are more of a religious war (like
with OS's) where their language or way of programming is the best or
only way. For the good programmers, a language is just a tool where
they find the strengths and weaknesses and how to use it for the job
being done.

Simpl and S+ are just programming languages. We need to learn
their strengths and weaknesses just like any other tool. There are
some places where Simpl is the right tool and some where S+ is the
right one. Since Simpl is the "native" language of the Crestron
processors and is required for everything you do programming in the
Crestron environment, it is the one that most time should be spent
on. When you find places S+ is the better language, use it but also
understand where it should and should not be used.

I know that in this environment, I am not one of your 'cream of the
crop' programmers. I am still trying to learn this envirnoment. The
way this type of group works isif you can help, do so. Some of the
times when you try to help, you find you are wrong but most of the
times, you are not. Some of the times, you find that you may be
right but there is a better way.

Chris


-----Original Message-----
From: Crestron@... [mailto:Crestron@...] On
Behalf Of Matt
Sent: Friday, January 23, 2009 5:10 PM
To: Crestron@...
Subject: [Crestron] Re: Question on finding the number of defined
array elements.

...I'm not knocking anyone here; we all
have to start somewhere, but there do appear to be a lot of guys
programming systems with some pretty shaky foundations in procedural
languages, and even simple syntactic issues (like the root of this
thread) could wreak havoc scrambling your processor's brains. So I
suppose you could argue "Pointers don't kill processors, programmers
do" ;-)


Hey, I resemble that comment. ;)

But in all honesty, I think the majority of Crestron programmers
don't have procedural backgrounds, and don't really need to, it's
not
a procedural language, some people might even say that it's not
MEANT
to be programmed with S+.

A lot of the programmers here are the 'cream of the crop' and I for
one appreciate the help, but I also like to think I help as well.
Sure, not with pointers or 'dynamic memory assignment' or what-have-
you, and also make syntax errors that I ask about, but helping out
with a 'I can't figure out how the example checksum is calculated'
is
good too...right? ;)




------------------------------------




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: Question on finding the number of defined array elements.

Chip Moody
 

Yeah. +1. I'd +2, but that would just be tacky of me.

Great post, Chris.

- Chip

--- In Crestron@..., "fellatedone" <j.legge@...> wrote:

Fantastic post. Thank you.

-JOHN

--- In Crestron@..., Chris Erskine <chris@> wrote:

Over the years, I have programmed in many different languages...


Re: strings with <cr><lf> in them

 

Yes it is Thanks


--- In Crestron@..., Heath Volmer <hvolmer@...> wrote:

Is it good now?

On Jan 24, 2009, at 11:30 AM, lcochbdr wrote:

i have just discovered my problem in that the string in the
serial
send is not the whole string i coppied it only coppied up to the
first crlf



--- In Crestron@..., "lcochbdr" <lcoch@> wrote:

I am issuing the advnetstats command to the polycom hdx and it
returns:

call:1 tar:24k rar:24k tvr:64.3k rvr:104k
tvru:63.8k rvru:114.6k tvfr:15.0 rvfr:15.0 vfe ---
tapl:66 rapl:0 taj:46mS raj:40mS tvpl:122 rvpl:0
tvj:21mS rvj:60mS dc:--- rsid:Polycom_4.2

at the end of each line is a <cr><lf>. right now i am just
creating
a
test program using a serial send to simulate the command return i
then am using a substring to get the individual parameters i
need.
When i try to grab a substring at a position after the end of the
first line i get an empty string.


--- In Crestron@..., Heath Volmer <hvolmer@> wrote:

You shouldn't be getting hung up on the CRLFs, depending on what
you're using to extract the strings. Can you provide more
details
about how your pulling out the strings?

Heath



On Jan 24, 2009, at 8:07 AM, lcochbdr wrote:

I have a string comming from a polycom hdx that is 4 lines of
text
seperated by <cr><lf>'s i am trying to pull sub strings from
it
however
i cannot get any from past the first <cr>. is there a way to
remove
the
<cr><lf>'s, or to read get to the parts of the strings past
them?

Thanks
Laurence


------------------------------------




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




------------------------------------




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: Can Crestron send this kind of signal???

 

I'm not actually sure it does require Simpl+ but I'm unsure of how to get
started and which logic symbol or combination of symbols will do what I want.
The serial controller I'm looking at _HTTP://pololu.com/catalog/product/727_
() is what I'm looking at to control 2
servos. The two servos will be commanded to move to a total of four positions
within their rotational capacity. The rotational values from full left to full
right range from 1 to 255. They will counter rotate but work together so one
will start at position 1 and the other will start from position 255. The
second point for example will be 50 and 205. Anyone care to take a stab at
telling me how to go about this? Thanks,
Chip

In a message dated 1/11/2009 1:02:08 P.M. Eastern Standard Time,
mdelzer@... writes:




Just out of curiosity, what will you be doing that you think requires
SIMPL+?

Mark

On Sun, Jan 11, 2009 at 12:29 PM, <_stefuel@...
(mailto:stefuel@...) > wrote:

I have found many serial servo controllers to do what I want. I'm great
with
hardware but not so good with programming which is why Simpl has worked so
well for me. This project is going to force me to move on to Simpl+. For
most
of you, this would be a walk in the park. For me it's like jumping in at
the
deep end with lead shoes on.


In a message dated 1/7/2009 10:55:05 P.M. Eastern Standard Time,
_tomsit@... (mailto:tomsit@...)
<tomsit%40rocketmaitomsi> writes:

--- In _Crestron@yahoogrou --- In _Cre_Crestron@yahoogroupCrest_
(mailto:Crestron@...) <Crestron%40yahoogrCrestron>
, "Tim
Rupp" <[email protected]> wrote:
> Second that.timing doesn't seem to be Crestron's strong point.
>


/tr
>

_____

From: _Crestron@yahoogrou From: _Cres_Crestron@yahoogroupCrest_
(mailto:Crestron@...) <Crestron%40yahoogrCrestron>

[mailto:_Crestron@ [mailto:_Crestron@<W_Crestron@yahoogroupCrest_
(mailto:Crestron@...) <Crestron%40yahoogrCrestron>
] On
Behalf
Of Mark Delzer
Sent: Tuesday, January 06, 2009 10:53 PM
To: _Crestron@yahoogrou To: _Crestron@yahoo_Crestron@yahoogroupCrest_
(mailto:Crestron@...) <Crestron%40yahoogrCrestron>

> Subject: Re: [Crestron] Can Crestron send this kind of signal???
>


Taking a SWAG here...maybe something like this __
()
(_ () )
<__ ()
(_ () ) > com/7jrezr I
didn't read through the details too much but it would be a lot
easier to
find a servo controller that Crestron can control than to try to
write in
code and control it with a versiport.

Mark
>
On Tue, Jan 6, 2009 at 10:46 PM, stefuel2 <stefuel@aol.
<mailto:stefuel%mailto:stef<stefuel%25mailto><WB> com> wrote:

> I'm working on a project that I'd like to control through
Crestron. I
am trying to control a digital motor (servo) that requires
sending it a
3-6 VDC pulse for positioning. This 3-6 VDC pulse width is in the
range
> of 1.0mS to 2.0mS with 1.5mS being mid travel. This pulse width
must be
sent every 20mS (50 times a second) for smooth operation. I would
like
to use a slider to select anywhere within the pulse width range
and
buttons for selecting a spacific pulse width settings. If you must
know, I'm designing my own variable masking front projection
screen.
Why do I always do stuff the hard way??? I should have looked at
the C
database. Prehaps there's a module in there that I could use or
modify
for something like this. Probably not.

> >



>

[Non-text portions of this message have been removed]
I would highly recommend you look at a dedicated controller, you will
get a much more predictable result. Using a Crestron controller to
send pulses will result in motion similiar to my wife trying to drive
my truck with a standard transmission, its going to jerk a lot, may
not move at all, will stop at unpredictable points, and really make
you wonder if there was a better way to get from point A to point B.

A stepper motor would be less costly and would be perfect for this
type of application. You'll find a lot of information for stepper
motors with a google search including several controller supliers or
plans to build one if you want to break out a soldering iron.

** **<WBR>**A Good Credit Score is 700 or Above. See yo

steps!
(
_
(
028747/aol?redir=)
cemailfooterNO62)

[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]




****A Good Credit Score is 700 or Above. See yours in just 2 easy
steps!
(
cemailfooterNO62)


Re: strings with <cr><lf> in them

Heath Volmer
 

Is it good now?

On Jan 24, 2009, at 11:30 AM, lcochbdr wrote:

i have just discovered my problem in that the string in the serial
send is not the whole string i coppied it only coppied up to the
first crlf



--- In Crestron@..., "lcochbdr" <lcoch@...> wrote:

I am issuing the advnetstats command to the polycom hdx and it
returns:

call:1 tar:24k rar:24k tvr:64.3k rvr:104k
tvru:63.8k rvru:114.6k tvfr:15.0 rvfr:15.0 vfe ---
tapl:66 rapl:0 taj:46mS raj:40mS tvpl:122 rvpl:0
tvj:21mS rvj:60mS dc:--- rsid:Polycom_4.2

at the end of each line is a <cr><lf>. right now i am just creating
a
test program using a serial send to simulate the command return i
then am using a substring to get the individual parameters i need.
When i try to grab a substring at a position after the end of the
first line i get an empty string.


--- In Crestron@..., Heath Volmer <hvolmer@> wrote:

You shouldn't be getting hung up on the CRLFs, depending on what
you're using to extract the strings. Can you provide more
details
about how your pulling out the strings?

Heath



On Jan 24, 2009, at 8:07 AM, lcochbdr wrote:

I have a string comming from a polycom hdx that is 4 lines of
text
seperated by <cr><lf>'s i am trying to pull sub strings from
it
however
i cannot get any from past the first <cr>. is there a way to
remove
the
<cr><lf>'s, or to read get to the parts of the strings past
them?

Thanks
Laurence


------------------------------------




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




------------------------------------



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



DMP XR500 Alarm Panel

Dean Detton
 

Has anyone integrated the DMP XR500 alarm panel with a Crestron control system? If so did you use the DMP XR200 module posted on the Crestron Integration Partner web site? I can't seem to find an RS232 interface option on the DMP web site. I am also interested in your experience and opinion on this panel. Thanks.

--
__________________________
Dean Detton
Prestige Automation, Inc.
Office: 775.853.0930
Fax: 775.853.3107
Mobile: 775.745.0298


Re: strings with <cr><lf> in them

Matt
 

Are you gathering the string to <lf> before you pass it to the
substrings?



I am issuing the advnetstats command to the polycom hdx and it
returns:

call:1 tar:24k rar:24k tvr:64.3k rvr:104k
tvru:63.8k rvru:114.6k tvfr:15.0 rvfr:15.0 vfe ---
tapl:66 rapl:0 taj:46mS raj:40mS tvpl:122 rvpl:0
tvj:21mS rvj:60mS dc:--- rsid:Polycom_4.2

at the end of each line is a <cr><lf>. right now i am just creating
a
test program using a serial send to simulate the command return i
then am using a substring to get the individual parameters i need.
When i try to grab a substring at a position after the end of the
first line i get an empty string.


--- In Crestron@..., Heath Volmer <hvolmer@> wrote:

You shouldn't be getting hung up on the CRLFs, depending on what
you're using to extract the strings. Can you provide more
details
about how your pulling out the strings?

Heath



On Jan 24, 2009, at 8:07 AM, lcochbdr wrote:

I have a string comming from a polycom hdx that is 4 lines of
text
seperated by <cr><lf>'s i am trying to pull sub strings from
it
however
i cannot get any from past the first <cr>. is there a way to
remove
the
<cr><lf>'s, or to read get to the parts of the strings past
them?

Thanks
Laurence


------------------------------------




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: strings with <cr><lf> in them

 

i have just discovered my problem in that the string in the serial
send is not the whole string i coppied it only coppied up to the
first crlf



--- In Crestron@..., "lcochbdr" <lcoch@...> wrote:

I am issuing the advnetstats command to the polycom hdx and it
returns:

call:1 tar:24k rar:24k tvr:64.3k rvr:104k
tvru:63.8k rvru:114.6k tvfr:15.0 rvfr:15.0 vfe ---
tapl:66 rapl:0 taj:46mS raj:40mS tvpl:122 rvpl:0
tvj:21mS rvj:60mS dc:--- rsid:Polycom_4.2

at the end of each line is a <cr><lf>. right now i am just creating
a
test program using a serial send to simulate the command return i
then am using a substring to get the individual parameters i need.
When i try to grab a substring at a position after the end of the
first line i get an empty string.


--- In Crestron@..., Heath Volmer <hvolmer@> wrote:

You shouldn't be getting hung up on the CRLFs, depending on what
you're using to extract the strings. Can you provide more
details
about how your pulling out the strings?

Heath



On Jan 24, 2009, at 8:07 AM, lcochbdr wrote:

I have a string comming from a polycom hdx that is 4 lines of
text
seperated by <cr><lf>'s i am trying to pull sub strings from
it
however
i cannot get any from past the first <cr>. is there a way to
remove
the
<cr><lf>'s, or to read get to the parts of the strings past
them?

Thanks
Laurence


------------------------------------




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: strings with <cr><lf> in them

 

I am issuing the advnetstats command to the polycom hdx and it
returns:

call:1 tar:24k rar:24k tvr:64.3k rvr:104k
tvru:63.8k rvru:114.6k tvfr:15.0 rvfr:15.0 vfe ---
tapl:66 rapl:0 taj:46mS raj:40mS tvpl:122 rvpl:0
tvj:21mS rvj:60mS dc:--- rsid:Polycom_4.2

at the end of each line is a <cr><lf>. right now i am just creating a
test program using a serial send to simulate the command return i
then am using a substring to get the individual parameters i need.
When i try to grab a substring at a position after the end of the
first line i get an empty string.


--- In Crestron@..., Heath Volmer <hvolmer@...> wrote:

You shouldn't be getting hung up on the CRLFs, depending on what
you're using to extract the strings. Can you provide more details
about how your pulling out the strings?

Heath



On Jan 24, 2009, at 8:07 AM, lcochbdr wrote:

I have a string comming from a polycom hdx that is 4 lines of text
seperated by <cr><lf>'s i am trying to pull sub strings from it
however
i cannot get any from past the first <cr>. is there a way to
remove
the
<cr><lf>'s, or to read get to the parts of the strings past them?

Thanks
Laurence


------------------------------------




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: A wireless router for every rack...?

 

we generally stick to resi. I tend to set up mac filtering and some
encryption. i think that is acceptable protection. My general
description to home owners is that Mac ID filtering is like a gate
that checks your drivers license and encryption is like a lock. (i'll
give a little wep=door lock, wpa==boltlock, etc description) Then I'll
tell them that just like a house, if someone with some skill wants in,
they are flat out coming in.

last rack i did for an actual company had an 8X in it. I set the
router up wide open. I got their IT department involved from the start
and left it up to them to lock it down.


OT: Mac wins the battle for neurotic Crestron programmer

Heath Volmer
 

Part 6.

After messing with the new Lenovo, I've decided that the Mac is the slight winner, and that perhaps I'm just a spoiled little Mac girl who thinks that everything should work perfectly all of the time. I won't recap my previous antics ( ), but in the two weeks or so since I freaked out on the Mac and ordered the Lenovo as it's replacement, I've come to realize: "shut the hell up Heath".

My conclusion, all computers suck some of the time, some more than others. I thought running Crestron on the Mac, with it's fine-tuned Windows installation sucked most of the time. It doesn't. Keyboard/ trackpad is a bit lacking, hard Drive access is a bit slow in certain cases (due to the VM layer), USB support comes and goes (due to the VM layer), 3D graphics is nearly impossible (due to the VM layer) but when it comes down to it, I have it pretty good.

I cracked open the new Lenovo W500. It's a pure-business looking machine. It's got every button I could want right on the face of it, plus about fifty that I kept tripping over - I figure I would get used to the extras. It was black plastic, with a matte finish case and a matte finish screen. The mouse pad was about 1/4 the size of the mac, which was odd at first, but so was using the Mac trackpad when I first started got it. All business.

I started out with a stress test, loading a game that I play too much. Wanted to see if the video was up to the malfunctioning Mac's level (the Mac's video card or drivers have issues that sometimes causes hard crashes when in Boot Camp Windows.) The game sucked. Graphics were choppy. I thought maybe the patchy method of installation that comes with MMOs might have something to do with it, so I downloaded a clean, full version of the game and reinstalled it. It was much better, but still nowhere near the quality of the Mac when it's not crashing. Strike one. Part of this was my fault as it turns out. The W500 comes with a "workstation" class graphics card, FireGL, not a card geared for gaming. But this was just for play...

Serious work, I loaded up the Crestron software. Fired up some apps, loaded some programs, got everything going and it felt slower. I broke out the stopwatch and discovered that even though similarly spec'd (the mac has a slightly faster CPU), load times on the Mac VM were always 10-20% faster. Once one gets used to it, the trackpad on the Mac is slick. It is much more efficient to get around. Strike two.

Had a BSOD at some point. I can count on one hand the number of those I've seen on my home-built PCs. While I've had unscheduled shutdowns on the Mac VMs I've never experienced a BSOD. It's possible that the VM is masking the blue-screen portion of the hard crash. It was always Parallels that seemed to randomly fail. Fusion has been nearly perfect.

Then there was the non-Crestron apps. How can anyone in their right mind use Outlook for anything? It is the single most bloated, hard to configure, hard to use piece of software I have ever seen. It is no wonder large organizations that use Outlook have rooms full of tech- help. I tried connecting it to my IMAP email account. After 3-4 tries I got connected, but it sure was weird. Deleting a message merely marks it for deletion? What the... All those stricken-through message titles in my mailbox sure did make it easy to read. (I did figure out how to delete them, permanently. No trash folder.) I couldn't keep track of all of the various layers of Personal Folders, Inboxes, etc. What a damn mess. I decided to go back to something that I was familiar with: Thunderbird for email. It set up in seconds and worked properly from the start, but it sure was slow compared to Apple mail. And then what about my iPhone sync... Strike three. For everyday stuff, Apple's apps are pretty slick. No Adobe Reader either!

Now in the real world not inhabited by us insane Mac users, all of this might be tempered somewhat by the fact that the Lenovo costs roughly half that of the Mac, and the Lenovo has a higher-resolution screen. But considering that I already own the Mac and that I would lose quite a bit of cash trying to sell it, that sort of nullifies the cost discussion. The slightly lower resolution Mac screen was far superior, even with the lousy shiny glass, then the Lenovo. I think if I had spec'd the Lenovo with the exact same features as the Mac (bigger HD, 1 GB more RAM that 32-bit XP couldn't access, .27 GHz faster CPU) it may have cost about the same, but those additional specs weren't the sort of thing to affect the day-to-day performance.

From a purely Crestron software in Windows standpoint, the "highly troubleshot", minimal VMWare Fusion XP setup on the Mac was a clear winner. I knew the Simpl Windows loads were fast (28 secs avg.) but I fully expected them to be faster on a non-VM setup.

I was expecting better things from the Lenovo. Don't get me wrong, it's a great machine. My point here was to acknowledge my whiny girl- ness. The Mac is doing a great job in the grand scheme of things. The Lenovo would have done a nearly as great of a job. It wasn't as loaded up with junk as Sonys and Dells are, but it evidently had enough stuff hidden in there to make things sluggish. Who knows what I would have broken in the Lenovo by removing the bloat. I couldn't tell what all the "think-ware" and "blah-blah-vantage" software on there was doing, and frankly I wasn't willing to spend the time. I'd still be stuck with Outlook at the end.


Heath


(I'll never complain about the missing delete key again.)


Re: strings with <cr><lf> in them

Heath Volmer
 

You shouldn't be getting hung up on the CRLFs, depending on what you're using to extract the strings. Can you provide more details about how your pulling out the strings?

Heath

On Jan 24, 2009, at 8:07 AM, lcochbdr wrote:

I have a string comming from a polycom hdx that is 4 lines of text
seperated by <cr><lf>'s i am trying to pull sub strings from it however
i cannot get any from past the first <cr>. is there a way to remove the
<cr><lf>'s, or to read get to the parts of the strings past them?

Thanks
Laurence


------------------------------------



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: Question on finding the number of defined array elements.

Jeremy Weatherford
 

An integer index is just as effective as a pointer into a string. The
other issue you bring up is that strings are not null-terminated.
Since we constantly work with serial protocols that use null bytes, I
happen to think this is a very good thing. If you want to pass
substrings around without recopying, just pass an index and a length,
and have the receiving routine only look at those characters.

Don't forget about byte() and setbyte() when you're lamenting the lack
of pointers -- they make up for the fact that you can't index a string
like an array of characters.

Jeremy

On Fri, Jan 23, 2009 at 5:16 PM, Chris Erskine <chris@...> wrote:
One of the things that I would do with pointers was for strings with delimiters, you would null out the delimiter and by using pointers, you could point to the start of the string without having to copy the data into new fields. There are a number of other uses that they can be used for but that was the one I was thinking about when Joseph talked about breaking up the XML files.



Chris


strings with <cr><lf> in them

 

I have a string comming from a polycom hdx that is 4 lines of text
seperated by <cr><lf>'s i am trying to pull sub strings from it however
i cannot get any from past the first <cr>. is there a way to remove the
<cr><lf>'s, or to read get to the parts of the strings past them?

Thanks
Laurence


Re: RTS reporting back error - TSTATS

 

I did speak with TB on this and they seem to think that the sensor
error's are being caused by bad power coming from the transformer at
the boiler. I'm going to take a closer look next week.


--- In Crestron@..., "christian_oates" <christian@...>
wrote:

--- In Crestron@..., "jrc.audiovideo" <jamesclaflin@>
wrote:

5. Error: Message from device Slot-10.ID-08: Sensor R1T type
USE:
1,17179 Errors @ 17179 (0056:0000:0056)
TimeStamp: 08:27:48 12-14-08 UpTime: 0 days 23:42:31.76
Task:
CRHostA


Anyone know what could be causing this?.. Haven't been onsite
to
see
if the temp sensor is bad yet...

Regards,

Jim
Hi Jim,

Did you ever figure out what this was? I'm getting an almost
identical
error from three out of six sensors (6 TSTATs on the system, one
sensor for each TSTAT). Except for the error (which we think is
contributing to the system restarting) the TSTATS are running
fine.

For everybody else: Each sensor is using a single pair of CAT5,
and
each has it's own CAT5 run (so hopefully no interference). I'm
pretty
sure we're under the 500 feet limit...

Christian Oates
e-home, inc.


Re: Question on finding the number of defined array elements.

fellatedone
 

Fantastic post. Thank you.

-JOHN

--- In Crestron@..., Chris Erskine <chris@...> wrote:

Over the years, I have programmed in many different languages
starting with assembler and moving up into what are called 4GL and
true Object Oriented languages. They each have their strong points
and their weaknesses. Each have places where they are the better
language for the usage. C was designed to be a higher level language
than assembler but still allow some of the power of assembler with its
pointers.

For some, programming languages are more of a religious war (like
with OS's) where their language or way of programming is the best or
only way. For the good programmers, a language is just a tool where
they find the strengths and weaknesses and how to use it for the job
being done.

Simpl and S+ are just programming languages. We need to learn their
strengths and weaknesses just like any other tool. There are some
places where Simpl is the right tool and some where S+ is the right
one. Since Simpl is the "native" language of the Crestron processors
and is required for everything you do programming in the Crestron
environment, it is the one that most time should be spent on. When
you find places S+ is the better language, use it but also understand
where it should and should not be used.

I know that in this environment, I am not one of your 'cream of the
crop' programmers. I am still trying to learn this envirnoment. The
way this type of group works isif you can help, do so. Some of the
times when you try to help, you find you are wrong but most of the
times, you are not. Some of the times, you find that you may be right
but there is a better way.

Chris


-----Original Message-----
From: Crestron@... [mailto:Crestron@...] On
Behalf Of Matt
Sent: Friday, January 23, 2009 5:10 PM
To: Crestron@...
Subject: [Crestron] Re: Question on finding the number of defined
array elements.

...I'm not knocking anyone here; we all
have to start somewhere, but there do appear to be a lot of guys
programming systems with some pretty shaky foundations in procedural
languages, and even simple syntactic issues (like the root of this
thread) could wreak havoc scrambling your processor's brains. So I
suppose you could argue "Pointers don't kill processors, programmers
do" ;-)


Hey, I resemble that comment. ;)

But in all honesty, I think the majority of Crestron programmers
don't have procedural backgrounds, and don't really need to, it's not
a procedural language, some people might even say that it's not MEANT
to be programmed with S+.

A lot of the programmers here are the 'cream of the crop' and I for
one appreciate the help, but I also like to think I help as well.
Sure, not with pointers or 'dynamic memory assignment' or what-have-
you, and also make syntax errors that I ask about, but helping out
with a 'I can't figure out how the example checksum is calculated' is
good too...right? ;)




------------------------------------



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: Question on finding the number of defined array elements.

Chris Erskine
 

Over the years, I have programmed in many different languages starting with assembler and moving up into what are called 4GL and true Object Oriented languages. They each have their strong points and their weaknesses. Each have places where they are the better language for the usage. C was designed to be a higher level language than assembler but still allow some of the power of assembler with its pointers.

For some, programming languages are more of a religious war (like with OS's) where their language or way of programming is the best or only way. For the good programmers, a language is just a tool where they find the strengths and weaknesses and how to use it for the job being done.

Simpl and S+ are just programming languages. We need to learn their strengths and weaknesses just like any other tool. There are some places where Simpl is the right tool and some where S+ is the right one. Since Simpl is the "native" language of the Crestron processors and is required for everything you do programming in the Crestron environment, it is the one that most time should be spent on. When you find places S+ is the better language, use it but also understand where it should and should not be used.

I know that in this environment, I am not one of your 'cream of the crop' programmers. I am still trying to learn this envirnoment. The way this type of group works isif you can help, do so. Some of the times when you try to help, you find you are wrong but most of the times, you are not. Some of the times, you find that you may be right but there is a better way.

Chris

-----Original Message-----
From: Crestron@... [mailto:Crestron@...] On Behalf Of Matt
Sent: Friday, January 23, 2009 5:10 PM
To: Crestron@...
Subject: [Crestron] Re: Question on finding the number of defined array elements.

...I'm not knocking anyone here; we all
have to start somewhere, but there do appear to be a lot of guys
programming systems with some pretty shaky foundations in procedural
languages, and even simple syntactic issues (like the root of this
thread) could wreak havoc scrambling your processor's brains. So I
suppose you could argue "Pointers don't kill processors, programmers
do" ;-)


Hey, I resemble that comment. ;)

But in all honesty, I think the majority of Crestron programmers
don't have procedural backgrounds, and don't really need to, it's not
a procedural language, some people might even say that it's not MEANT
to be programmed with S+.

A lot of the programmers here are the 'cream of the crop' and I for
one appreciate the help, but I also like to think I help as well.
Sure, not with pointers or 'dynamic memory assignment' or what-have-
you, and also make syntax errors that I ask about, but helping out
with a 'I can't figure out how the example checksum is calculated' is
good too...right? ;)




------------------------------------



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: Newbie Simpl+ Question

 

Hi Chris,

I have been using a simpl+ macro for some time that is doing
something like that.

My inputs are
Touchpanel in use
Room in use
Menu in use
Direct selection of a voice
Max Pages for each menu(array)

outputs are
array of menus containing page selected for each menu
with an analog equate you feedback pages so that each zone has its
own menu Functions: light,av etc,
av equip: sky, dvd
av out: plasma vp (for each room)

I use one macro per touchpanel. I could actually use the single macro
for the whole project... but i prefer splitting things up

the framework in simpl uses crosspoints to handle matrix, devices,
etc everything that is global for zones and devices

raf


--- In Crestron@..., "scates98" <ccates98@...> wrote:

Hey Chip,

Thanks for your reply! I spent about a day or two trying to figure
out how I could program this in SIMPL+ and eventually gave up
because
I couldn't figure out how to do it. I went back to SIMPL Windows
and
continued writing the module. When I look at the code I've written
in
SIMPL Windows it just looks like a lot of code and when I see my
code
go that way I start thinking I've made things too complicated. My
paranoia starts going because I think signals won't be resolved in
logic waves and then things won't work exactly as they should. I've
done all I can to keep the code down to it's minimum so things will
work efficiently.

Since the menu is going to be generated by a TPS-GA-TPI (touchpanel
interface for standard display devices) there will be no touch input
to navigate the menu. The only device to interface with the menu
being displayed will be an ML-600 remote. When the user presses
Menu
on the ML-600, I want the Menu to toggle on/off. They will then
have
to use the direction pad to navigate the on-screen menu. I've
broken
this down into two components, Menu Selection and Menu Control which
is selected by the left/right dirpad buttons. When in Menu
Selection
mode the user is choosing from the list of rooms, sources, lights,
shades, etc. when the user is in Menu Control mode the user is
selecting options from the current Menu Selection. Example, when
the
user selected rooms from the Menu Selection they immediately switch
to
Menu Control mode and start choosing a floor followed by a room.
The
inputs are fairly simple dirpad signals and such to control
navigation. Output signals are to switch between pages and subpages
for menu navigation. Example: pressing the Enter button on the
dirpad
when selecting Rooms from the Menu Selection list will switch the
TPS-GA-TPI to display the room selection page and force the Floor
Selection subpage high. After using the up/down dirpad buttons the
user will select a floor and press the dirpad enter button again to
choose a floor which will display the room list for that floor.

This is why I was thinking of using an array. In SIMPL Windows I
control this using a Ring Counter with Seed so I can send an analog
value to the Ring counter to turn all outputs off or force one on.
This in conjunction with interlocks help to enable the correct
buffer
for navigational control. If I knew how to create a buffer in
SIMPL+
I might have enough to make the module work. However, I keep
thinking
I'm reinventing the wheel if all I'm doing is making the same
signals
in SIMPL+ that I've already written in SIMPL Windows.

I hope this answers your question. I appreciate your input and
perhaps you're right. Maybe I should keep this in SIMPL Windows. At
least I'll know how to troubleshoot it! lol

Thanks,

- Chris


--- In Crestron@..., "Chip Moody" <cfm@> wrote:


I'm certainly not going to steer you away from diving into S+,
but
I'm going to question whether what you're trying to accomplish in
this
case is better off left in SIMPL. Based on what you've
described, it
doesn't sound like you're going to be pushing the limits on the
processor by any means - even if you had 16 instances of
the "block"
of code AND had 16 people pounding buttons in each zone at the
same
time. (16 instances of a block of code with a zillion signals
where
only one instance is going to be used by the client at any one
time is
pretty much a non-issue)

If you want to neaten things up a bit, get the block to a point
where you think it's got all the goezintas and goezouttas you
need,
and turn it into a SIMPL module. Then you can just drop 16
instances
of the completed module into your program. No, it doesn't make
any
difference on processing - it'll just make your main program's
code
easier to read through and maintain.

If you're still interested in making an S+ version for
self-educational purposes at the very least, could you describe
the
signals going in/out a bit more? I wasn't able to get a clear
enough
picture to advise/suggest S+ approaches.

- Chip


--- In Crestron@..., "scates98" <ccates98@> wrote:

Hi all,

Sorry for the long post, but I like to give a lot of details to
help
people understand what I'm trying to do. I'm an experienced
SIMPL
Windows programmer but SIMPL+ is still pretty new to me. I'm
trying
to find a way to program a custom menu subsystem for my client
and was
hoping someone could help me in building this in SIMPL+.

The client will be using an ML-600 and he's only going to be
using
some basic inputs like: dirpad up/down/left/right/enter and page
up/down on the remote to navigate an on-screen display
generated by a
TPS-GA-TPI. He wants to have the ability to control any zone
in the
house. So I've created a GUI so he can select room control,
source
control, lighting control, climate control, shade control and
security
control.

In SIMPL Windows I am using a series of buffers and interlocks
to
control when the dirpad up/down/left...etc. signals are in use
for a
particular menu. I am also using a series of Ring Counter with
Seed
symbols to allow him to navigate the on-screen menu using only
the
dirpad on the ML-600. Example: the user selects "Choose Room"
from
the primary menu, then uses the ring counter to scroll through
the
floors, another ring counter controls the scrolling through
rooms for
the selected floor.

As I'm building this project, I am noticing that my menu
system, built
in SIMPL Windows, is creating a lot of signals and I'm
concerned with
how well it will function after I've duplicated it for all
zones which
require it (at least 16 zones). I know that if I were to build
this
in SIMPL+ it would be much more efficient and easier to copy,
but I am
confused on how I could write it as I'm not experienced in
SIMPL+. I
thought of using an array to create a table where the first row
would
contain values for the primary menu (rooms, sources, lights,
etc.).
Then each column would contain values for each of the primary
menu
items (ex: 1=first floor, 2=main floor, 3=upper floor, etc.).
However
I do not understand how to buffer the dirpad up/down commands to
control the scrolling through the list. I keep thinking about
using
an IF statement but then I'm writing a large amount of nested IF
statements to control when the up/down command is enabled for a
specific menu. Perhaps using a long SWITCH/CASE statement would
work?

Any help you can provide would be greatly appreciated as I know
I need
to get my head into SIMPL+ programming to become a better
programmer.
Please try not to get too technical with your replies as I'm
still
new to programming this way and can get lost quickly.

Thanks In Advance For All Your Help,

- Scates

P.S. I've read the SIMPL+ programming help PDF and it's helped
me to
get this far. I really need to take some sort of programming
class to
better learn this.


Re: Simpl+ Parameters

Steve Kaudle
 

The line would look something like:

digital_input _skip_, input1, input2;

Add as many instances of "_skip_" as you have parameters.

The same method can be applied to the output, or you can use the
declaration "#output_shift X", where X is the number of spaces you
want the first output shifted down.

Why there is no "#input_shift" declaration is anybody's guess?

--- In Crestron@..., roomy4545 <roomy4545@...> wrote:

So how do you type it?

should it be "digital_input test1"_SKIP_
then parameters (that's how i'm doing it)

or should it be the parameters first then skip then the digital inputs?


or should the skip then digital parameters...?

Could you show an example


________________________________
From: maxpower68 <maxpower68@...>
To: Crestron@...
Sent: Saturday, January 24, 2009 12:01:39 AM
Subject: [Crestron] Re: Simpl+ Parameters


Yes se the "_SKIP_" this will drop the digital inputs below the
parameters. This is the only way to do this. It's back ass wards but
it works.

Max

--- In Crestron@yahoogroup s.com, roomy4545 <roomy4545@ ..> wrote:

Anyone know why with my simpl+ the digital inputs are on the same
line as parameters (when you look at the symbol in Simpl?). Is there
a way you are supposed to declare them so i can see the names of the
digital/serial input names and for the parameters to go at the bottom
of the symbol.
?
As it stands now, the paraters start at the top of the symbol and
go down. I tried using the "_SKIP_" to try to create space between my
input symbols and the parameters.
?
Any help would be appreciated




[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]


Re: Simpl+ Parameters

roomy4545
 

So how do you type it?

should it be "digital_input test1"_SKIP_
then parameters (that's how i'm doing it)

or should it be the parameters first then skip then the digital inputs?


or should the skip then digital parameters...?

Could you show an example


________________________________
From: maxpower68 <maxpower68@...>
To: Crestron@...
Sent: Saturday, January 24, 2009 12:01:39 AM
Subject: [Crestron] Re: Simpl+ Parameters


Yes se the "_SKIP_" this will drop the digital inputs below the
parameters. This is the only way to do this. It's back ass wards but
it works.

Max

--- In Crestron@yahoogroup s.com, roomy4545 <roomy4545@. ..> wrote:

Anyone know why with my simpl+ the digital inputs are on the same
line as parameters (when you look at the symbol in Simpl?). Is there
a way you are supposed to declare them so i can see the names of the
digital/serial input names and for the parameters to go at the bottom
of the symbol.
?
As it stands now, the paraters start at the top of the symbol and
go down. I tried using the "_SKIP_" to try to create space between my
input symbols and the parameters.
?
Any help would be appreciated




[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]