<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[CANNY logic forum — Sending sequence of messages as part of state machine]]></title>
	<link rel="self" href="https://forum.cannylogic.com/extern.php?action=feed&amp;tid=29&amp;type=atom" />
	<updated>2020-01-20T15:48:24Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.cannylogic.com/viewtopic.php?id=29</id>
		<entry>
			<title type="html"><![CDATA[Re: Sending sequence of messages as part of state machine]]></title>
			<link rel="alternate" href="https://forum.cannylogic.com/viewtopic.php?pid=871#p871" />
			<content type="html"><![CDATA[<p>Please see attachment:</p>]]></content>
			<author>
				<name><![CDATA[Denis, CANNY logic]]></name>
				<uri>https://forum.cannylogic.com/profile.php?id=3</uri>
			</author>
			<updated>2020-01-20T15:48:24Z</updated>
			<id>https://forum.cannylogic.com/viewtopic.php?pid=871#p871</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Sending sequence of messages as part of state machine]]></title>
			<link rel="alternate" href="https://forum.cannylogic.com/viewtopic.php?pid=869#p869" />
			<content type="html"><![CDATA[<p>I am trying to initialize and communicate with a electric motor controller on a CAN bus. </p><p>The protocol requires me to send and Init sequence of 3 consecutive messages with ID 0x000, length 2 bytes and the following content:<br />0x000 81 00<br />0x000 80 00<br />0x000 01 00<br />These need to have approx 20-40ms between them.</p><p>After these I need to send a Sync message with ID 0x080, length 1 byte and content 00:<br />So it looks like 0x080 00</p><p>I need to repeat the above (Init + Sync) until I receive InitReady message with ID 0x181 and content of 40 00 within it. </p><p>After the InitReady I need to only send the Sync message every 500ms and check that the 0x181 (InitReady) message has the 40 00 with it. </p><p>If I don&#039;t see the InitReady message within 1000ms I revert back to (Init + Sync) as above.</p><p>I tried several different strategies, but I think I am missing something. <br />Here is the cfd file I have made so far. </p><p>It seems I have problem syncronizing the ReadyToSend with the 20-40ms timespan between the 0x000 messages. <br />And from the simulation I can see that I have some issues with retaining the current_msg to the value needed. </p><p>Any help is appreciated!</p><p>Thank you in advance, <br />Nikolay</p>]]></content>
			<author>
				<name><![CDATA[shishi]]></name>
				<uri>https://forum.cannylogic.com/profile.php?id=261</uri>
			</author>
			<updated>2020-01-18T22:47:38Z</updated>
			<id>https://forum.cannylogic.com/viewtopic.php?pid=869#p869</id>
		</entry>
</feed>
