suggestions for enhancements to webcontrol (not 32)

Hello, thank you for your answer. In October you spoke about an SPI piggy-back board, has this been abandoned?
thanks 
 
CAI_Support said:
Hi Efried,  we do not plan to change the hardware design to implement the SPI interface, because that will cause all existing boards using different firmware, besides, SPI support is already doable in the PLC logic.
 
mwester said:
Given everything you're looking for in a PLC, Efried, why not just use a Raspberry Pi instead of the WebControl device?
 
well so far I wanted avoiding struggling around with software coding. Paspberry Pi consumes to much energy, I guess I will test some  ATMEL or ST Micro ARM Cortex M4 solutions offering an IDE. So far WC is the easier way for prototyping, because of the 1-wire support. But I have to decide to make my own solution for remote control, with the WC or start right now with the wireless microcontrollers. It is the same with all easy-entry solution. If you have to achieve special targets it gets complicated.
 
Hi Efried,
 
Since Ross already implemented a SPI handling logic in PLC, it is best to do that way, it will reduce hardware requirement and achieve same result.  That will also improve the reliability by reduce board count.  WC8 has limited hardware resources.  If something can be done in software, we would rather to use limited hardware resources to implement something can only be done in hardware.
 
Some may think you asked too many questions, but we don't think that way.  We think people who asked a lot of questions, because they are interested in using this solution.   Once played with PLC and familiar with it, one will find that WebControl is a best solution without dealing with a lot of hardware registers and low level protocols.
 
CAI_Support said:
Hi Efried,
 
Since Ross already implemented a SPI handling logic in PLC, it is best to do that way, it will reduce hardware requirement and achieve same result.  That will also improve the reliability by reduce board count.  WC8 has limited hardware resources.  If something can be done in software, we would rather to use limited hardware resources to implement something can only be done in hardware.
 
Some may think you asked too many questions, but we don't think that way.  We think people who asked a lot of questions, because they are interested in using this solution.   Once played with PLC and familiar with it, one will find that WebControl is a best solution without dealing with a lot of hardware registers and low level protocols.
 
thanks you for your warm words. The dispute broke out after I proposed a file format storing a WC project in its whole.
It would be a first and helpful step if you could delete comment lines when transferring the code from the HTML form into the WC.
I have bought a wireless bridge so I hope my biggest problem in prototyping is sold. But for stand alone solutions with clients may be a RF-based solution will be appropriate, I have to test.
The second open point, PWM should be achievable with WC32 as I understood.
 
We are considering adding PWM output on the WC8 first, using the spare pins on the 8 pin header.  We ran into a problem with the controller register is too small, so that lowest frequency is not as low as we like. 
 
Once PWM is ready, customers who has bootloader on board can update the firmware to get that feature.
 
Efried said:
The dispute broke out after I proposed a file format storing a WC project in its whole.
It would be a first and helpful step if you could delete comment lines when transferring the code from the HTML form into the WC.
 
The "dispute" that I believe you intimate, was certainly not over just "proposing" a file format.
As I already said, I store pretty much everything in a single file now.
 
That said, it would certainly save a step if CAI could make their interface *IGNORE* comments. Permit them to be entered, but just not send them to the WC.
 
My "Issue" with you was the manner in which you constantly "demanded" cai make the WC8 something it isn't and was never intended to be, to the detriment of its core market. Saying they "must" do this or lose market, and they "must" add wireless or loadable drivers or any number of things you wanted.
 
Making a case for something that will benefit the whole webcontrol community, without losing backwards-compatibility, adding cost or additional "must have" software dependencies is fine. But you really get MY back up (and I dare say some others too) when you make like you're the only person ever to buy or use them and that they "must" make all these changes you want (and then feel badly done by when others rebut you).
 
I posted this in another thread but it belongs here as a desired improvement. This feature needs to be built into the code compiler/interpreter to be readily usable to the coder.
 
(Since I cannot seem to paste into this forum this was the only way to copy it here.)
 
There just may not be enough eprom/ram space to implement constant string substitution..
 
Code:
Constants. Just plain and simple string substitution. Something like:

CONST total ram1
CONST average ram2
CONST tcount 2

So now the code could be more self-documenting

Instead of:

set ram1 ram3
add ram1 ram3 ram1
div ram1 2 ram2


Now we could use
set total ram3
add total ram4 total
div total tcount average

Storage locations could be changed with one line of code change by changing the CONST statement.
Lines could be much more readable, less cryptic, and self documenting.
Constants could be designated to the compiler with a $ prefix or other char. for ease of parsing.

set $total ram3
add $total ram4 $total
div $total $tcount $average
 
Other languages use this simple string substitution to great advantages and I feel it could be implemented fairy easily in the Webcontrol bringing the language up a large notch.
 
It seems on the surface to be a fairly trivial job to implement. Shouldn't require any changes to the WC code itself, only to the javascript "compiler" that runs in the browser anyway. I'd be happy to see this one come about too :)
While not as immediately readable with the $variable, that would probably make the code easier I think.
 
I would prefer no "$" character also, but as a sympathetic code writer it may be harder to parse without a unique identifier. Every word would have to be user table searched first. If the code is interpreted a slow down in response would be a negative.
 
I am not sure how the code is being handled inside, whether compiled to native code, some I-code, or just interpreted. Since errors are complained about up front, we know some compiling/parsing is happening right away.
 
Simple string substitution could open up many cool coding tricks and eliminate much commenting to clarify code. If control characters were allowed small macro code modules could even be implemented. Just naming the variables and I/O would be enough for greedy me right now. :D
 
Would it possible to eliminate the regulator and install a microUSB power connector?
 
I understand the UK was going through legislation to enforce all one connector for cell phones to be allowed in the countries. I am not sure how far it got but the microUSB is winning. It has become mostly standard in Canada now except for Apple, the arrogant.. (so far :) )
 
People like it. Easy to run CAI in your vehicle without soldering? Readily available parts.
 
Actually some other people had recommend that before.  Maybe we should consider to have that to be an option, since almost everyone has spare cell phone chargers around.
 
It could eliminate much heat on the PCB.
 
OTOH: Do peripheral devices need higher voltages to run?
 
If so users would require a second PS to power I2C or 1Wire devices.  I have no experience with any of these peripherals yet.
 
We hesitate to do that is because there is no way to add a diode for preventing people wired polarity wrong.  Diode will introduce voltage drop on 5V supply.
You may argue that USB connector guaranteed no polarity problem, however, in reality, there will be people extend the power wire and wired wrong.
When they burned the board, they would ask us to replace it and tell our resellers the problem was our board. 
We must protect them, as well as protecting ourselves.  That is something we have to put into consideration, too.
 
But without power regulator, that is attractive idea for many who has spare call phone chargers.  Do you think the USB connector is too easy to be disconnected?
 
I2C and SPI chips taking 3.3V or 5V power.  They don't take much current normally, but they do introduce digital noise, so add filtering capacitor to each chip's power pin is recommended.
 
I'll weigh in - for my projects using a 5V USB connecter has no value.
 
I like being able to use a higher input voltage - I use 9V, it lets me do my own down regulator if I need 5V and 9v works fine for most 12v devices, fans and relays.
 
If you are going to respin the board my personal preference is to use a switch mode down converter (like WC32) so input voltage can be 12V without wasting energy or creating too much heat. If direct 5V operation is desirable for marketing purposes why not use a PTC or fuse and a shunt diode. That will protect the board from reverse power.
 
/tom
 
Back
Top