Posted 27 May 2019 Hello, I am trying to generate a wave form, such as sin, using mitsubishi's LCPU. The problem I met is that time precision of the wave form generated is only about 30ms. I checked my cpu scan time is about 2-3ms. my DA conversion specification is 1ms/channel. I am afraid CC-Link communication delay is the cause, but not sure. From the wave form, it seems some where time division is limited to about 30ms. I have expected at least for example 10ms can be obtained, i.e. if the period of my wave form is 100ms, I can output and get at least 10 data points. Would anyone give me some advice. Many thanks in advance. Ting Xing Share this post Link to post Share on other sites
Posted 28 May 2019 Have you read the topic ? With 3ms scan time you should get 10 points per 30ms... Share this post Link to post Share on other sites
Posted 3 Jun 2019 (edited) Thank you very much for your reference link. I am not sure, but what I got is not so quick: 10 points per 30ms. what I got seemed to be limited to an interval of 30ms. The attached file is what I took from oscilloscope, which I output interpolated value from table by using SCL instruction. Though the table has about 10 points to describe Sin curve, it should not have been so coarse as what is shown in the picture. The picture apparently shows the limit of 30ms. I have checked scan time, which is 2-3 ms, and D/A's specification is 1ms/channel, so the limit might be bottle-necked at somewhere else ... Ting Xing Edited 3 Jun 2019 by tingxing Share this post Link to post Share on other sites
Posted 3 Jun 2019 Hi, I doubt that the speed of internal (interblock) bus affect to the speed of DAC. What may affect I can not say without studying your program. BTW: I've tested the algorithm, proposed by me, using a chinese replication of FX2N. In fact the chinese PLC has a better performance, than the original FX2N: the actual scantime, measured by a counter/timer routine, is equal to 225us and each scan of program I got a new data point of sine wave, i.e. it allows to output a sine wave with frequency up to 500Hz (resolution is 20 data points per sine wave period). The sample is attached. May be it will help you to localize a problem. FX2N_Sine_Wave.zip Share this post Link to post Share on other sites
Posted 3 Jun 2019 P.S. The PLC, on which I made test, has a pair of AIs/AOs onboard. Share this post Link to post Share on other sites