AdamEMC Posted July 11, 2012 Report Share Posted July 11, 2012 Hi I am new to visilogic and PLC's in general so excuse me if my question is a simple one. My PLC is a Vision 130, which has high speed inputs and outputs. I understand that with the use of PID function blocks you can produce a PWM output signal but I am looking to interpret a PWM signal from a device to the PLC. The device is a synchronisation relay to synchronise a generator to the grid. It produces the following: data is pulse width modulated SYNC: 8ms high 1: 4 ms high 0: 2 ms high ; a data packet consists of 10 bits data: first sync 8mS high then b0-b1-b2-b3-b4-b5-b6-b7-b8-b9 I want the controller to be able to read this 10bit data packet so I can use its analogue value within the program. Is this possible with the high speed inputs I have or will I need to convert the PWM signal to an analogue signal seperately and just use one of the analogue inputs on the PLC? Thanks in advance Adam Link to comment Share on other sites More sharing options...
Damian Posted July 11, 2012 Report Share Posted July 11, 2012 I wouldn't consider your signal as PWM. The speed of the signal is probably too fast to read reliablly. It might work, but I doubt it because you're right at the edge of the limitations. Scan time will be a huge factor so your program size will have to be kept at a minimum. It would help if you had a faster processor like with the V570. Too bad it is just not a simple communication signal going RS485/RS232. Depending on the scan I think it will be difficult to tell the difference between a long 2ms pulse and a shot 4ms pulse. Maybe someone will have a clever idea. Link to comment Share on other sites More sharing options...
AdamEMC Posted July 11, 2012 Author Report Share Posted July 11, 2012 Thanks for your quick reply Would it be better just to convert the signal to an analogue signal prior to the PLC and just use one of the analogue inputs. I don't have much knowledge of how to do this but everywhere I look suggests an RC low pass filter. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted July 11, 2012 MVP 2023 Report Share Posted July 11, 2012 Don't use an RC filter. There's data in your signal and the bit location is significant. What is the voltage level of the signal? Could you possibly convert it to RS232 and read it through the serial port as a word? Joe T. Link to comment Share on other sites More sharing options...
AdamEMC Posted July 12, 2012 Author Report Share Posted July 12, 2012 Thank you for your reply the signal voltage is 0-5V How would I convert it to RS232? Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted July 16, 2012 MVP 2023 Report Share Posted July 16, 2012 Use a MAX232 chip if you want to build your own or Google "TTL to RS232 converter" if you want to buy one. Joe T. Link to comment Share on other sites More sharing options...
MVP 2014 Simon Posted July 17, 2012 MVP 2014 Report Share Posted July 17, 2012 Hi Joe, I would expect TTL data to be High for a "1" and Low for a "0". However the first post in this thread indicates the signal is continuously pulsing, and the pulses are 4ms long for a "1" and 2ms long for a "0". It looks like a special type of signal, so I don't think a TTL to RS232 convertor would work. It may work by using the 1.25ms interrupt on the V130 and use a normal digital input. If the signal is high for 1 or 2 interrupts then it is a "0" and if high for 3 or 4 interrupts it is a "1". However I would test, as this is playing at the limits of what is possible. You will also need a fast solid state relay to bring the signal up to 24VDC for the PLC to detect it. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted July 17, 2012 MVP 2023 Report Share Posted July 17, 2012 Good point, Simon. My ADD missed the time for the "0" data. Most solid state relays aren't fast enough to convert the data. I've done it with an NPN transistor acting as a switch and some bias resistors, which also inverts the signal: Joe T. Link to comment Share on other sites More sharing options...
Damian Posted July 17, 2012 Report Share Posted July 17, 2012 Adam, my question is, what is normally used to read this signal? Certainly they must already have a means of interfacing this thing in a more conventional manner. Do you have a manual for it, or part # you can post so we understand better what this "synchronization relay" really is? Link to comment Share on other sites More sharing options...
MVP 2014 Simon Posted July 17, 2012 MVP 2014 Report Share Posted July 17, 2012 I did qualify the suggestion SSR to look for a "fast" SSR (I would say minimum 10kHz to avoid distortion). Otherwise the transistor idea is of course fine, or perhaps an optocoupler (once again check response time). Weidmuller make an SSR capable of 100kHz (89377990000), but it is not suitable for the 0...5V TTL signal level. Link to comment Share on other sites More sharing options...
AdamEMC Posted July 24, 2012 Author Report Share Posted July 24, 2012 Thank you all for you help http://www.rayleigh.co.uk/product_details.cfm?ID=SI14 That is the product I am looking at. It has an option of an analogue idicator which uses the signal described above but they don't really provide much information about it. Although I am starting to think it would be easier for me to make something myself using an SSR, voltage tranducers etc Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now