Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Patriot on December 12, 2017, 08:58:46 PM
-
Can I read an encoder with an SSI interface with a DoMore? Not familiar with this method at all, but curious none the less.I have other options, but thought it would be challenging.
-
There's no way to do it now. I had never heard of it before. It appears to be loosely related to SPI.
-
It a serial interface I have several laser distance sensor that use it. You have your data pair of wire then a clock pair so the transmitting source controls the clocking not a baud rate chip.
https://en.wikipedia.org/wiki/Synchronous_Serial_Interface
-
It a serial interface I have several laser distance sensor that use it. You have your data pair of wire then a clock pair so the transmitting source controls the clocking not a baud rate chip.
https://en.wikipedia.org/wiki/Synchronous_Serial_Interface
It would be quite easy to implement. Not sure about market size though.
-
Actually...thinking about this more...
If you were really intent on reading a device and weren't super concerned about speed, you could probably bit bang BRX immediate outputs to create the clock, and use BRX interrupt inputs to read the changing input state. One fast output for the clock, one fast input for the interrupt trigger (opposite clock edge to data changes), and one fast input for the data. Gut tells me it would take ~500us to read an encoder (depending on resolution) but I think it could be pretty reliable. If the 500us (or more) scan bump didn't offend you, you could put the whole routine in a task block and fire it off whenever you wanted to update the encoder value.
-
We didn't do it...but if we were to implement an immediate input instruction, it would eliminate the interrupt input and would be quite a bit faster.
SETI Clock
RSTI Clock
INI Data
SETI Clock
RSTI Clock
INI Data
...etc
-
We're implementing the immediate input instruction for BRX onboard inputs...PLC side is done. Embarrassingly easy.
It looks like the physical layer for SSI is RS485, so I'm not sure how the interface between single-ended I/O and differential pairs would work, but having a bit bang capability is useful for other things like SPI or I2C. For folks skilled in such things, many neat things are possible.
As an FYI, using a series of immediate output instructions, I can generate a clock of about 200kHz. That would drop a little once once the input instructions were thrown in, but it should still be 150kHz or better. Easily fast enough to sample something like an encoder.
-
Would a FC-ISO-D Handle that?
-
it won't handle the clock because the FC-ISO-D can't transmit differential. It could do the data however, although without the clock it's kinda useless.
-
SSI would be great. maybe a POM?
If I could use SSI sensors with BRX. I would use more BRX.
-
If you really needed to use this type of device, this looks like an option.
http://www.bei-industrial-products.com/e_serial-converter.html....