<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[CANNY logic forum — Timing when setting values of one frame based on a value in another]]></title>
		<link>https://forum.cannylogic.com/viewtopic.php?id=54</link>
		<atom:link href="https://forum.cannylogic.com/extern.php?action=feed&amp;tid=54&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Timing when setting values of one frame based on a value in another.]]></description>
		<lastBuildDate>Thu, 14 Apr 2022 16:59:53 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Timing when setting values of one frame based on a value in another]]></title>
			<link>https://forum.cannylogic.com/viewtopic.php?pid=970#p970</link>
			<description><![CDATA[<p>You are welcome!<br />Then CAN GW is enabled, the messages selection / altering / modifying / retransmission is performed by it asynchronously, at the moment when the message arrived, regardless of the current diagram step.</p><p>By default, the diagram receives via CAN-driver&#039;s registers each message that was caught by any active CAN GW selector . But you can disable this through the CAN GW driver&#039;s Tracing mode registers.<br />Please: <a href="https://cannylogic.com/docs/c72duo/cangateway/#sec--c72duo-cangateway-operation_diagram" target="_blank">https://cannylogic.com/docs/c72duo/cang … on_diagram</a></p>]]></description>
			<author><![CDATA[null@example.com (Konstantin, CANNY logic)]]></author>
			<pubDate>Thu, 14 Apr 2022 16:59:53 +0000</pubDate>
			<guid>https://forum.cannylogic.com/viewtopic.php?pid=970#p970</guid>
		</item>
		<item>
			<title><![CDATA[Re: Timing when setting values of one frame based on a value in another]]></title>
			<link>https://forum.cannylogic.com/viewtopic.php?pid=966#p966</link>
			<description><![CDATA[<p>Thanks Konstantin. Can you tell me more about what you mean when you say the CAN gateway runs asynchronously to the diagram?</p><p>I guess the main problem I&#039;m having is that I am unclear about when a message is processed in the diagram and when it isn&#039;t.</p><p>Is it possible to have the message sent through from CAN0 to CAN1 unmodified, but still use the diagram to inspect (but not change) the data in the message?</p>]]></description>
			<author><![CDATA[null@example.com (nicedream)]]></author>
			<pubDate>Mon, 11 Apr 2022 02:14:42 +0000</pubDate>
			<guid>https://forum.cannylogic.com/viewtopic.php?pid=966#p966</guid>
		</item>
		<item>
			<title><![CDATA[Re: Timing when setting values of one frame based on a value in another]]></title>
			<link>https://forum.cannylogic.com/viewtopic.php?pid=965#p965</link>
			<description><![CDATA[<p>As for me, Option 2 &amp; Option 3 sounds great.<br />For such long sending intervals, the overhead can be neglected. Moreover, CAN gateway driver running asynchronously to the diagram. So I personally prefer Option 2 as a clearer solution - no need to disturb the CAN GW driver for nothing.</p>]]></description>
			<author><![CDATA[null@example.com (Konstantin, CANNY logic)]]></author>
			<pubDate>Tue, 05 Apr 2022 17:40:54 +0000</pubDate>
			<guid>https://forum.cannylogic.com/viewtopic.php?pid=965#p965</guid>
		</item>
		<item>
			<title><![CDATA[Timing when setting values of one frame based on a value in another]]></title>
			<link>https://forum.cannylogic.com/viewtopic.php?pid=964#p964</link>
			<description><![CDATA[<p>When implementing a CAN gateway, is there a good method or general &quot;best practice&quot; for setting a value in one CAN data frame based on a value in a different frame, when those two frames are sent at different intervals?</p><br /><p>Here&#039;s a simplified example to demonstrate what I mean:</p><p>A data frame (CAN ID 001) is sent through the gateway at an interval of once per second.<br />A different frame (CAN ID 005) is sent through the gateway once every 5 seconds.<br />(The CAN IDs&nbsp; aren&#039;t real, I just made them to correspond to the intervals)</p><br /><p>When a bit is set to 1 on frame 001, I want to set a bit in 005 to 1.<br />What&#039;s the best way to implement this?</p><br /><p>When the 001 frame comes through the gateway I could do the following:<br /><strong>Option 1</strong>: Generate a new 005 data frame - It seems like this would not be ideal, because I don&#039;t know what the other values in that frame should be.&nbsp; I could set them all to 0, but that seems like a bad idea.</p><p><strong>Option 2</strong>: Constantly store the most recent values that come through in the 005 frames, so that if I need to generate a new frame then I have the data I need to populate it.&nbsp; This seems like it would work, but might be a lot of overhead to constantly read and store those values.</p><p><strong>Option 3</strong>: When the bit is set or unset on the 001 frame, set a flag that enables or disables the rewrite rule on the 005 frame.&nbsp; It seems like this would be the best and cleanest option.</p><br /><p>Am I on the right track with this?&nbsp; Or is there a better way that I&#039;m missing?</p>]]></description>
			<author><![CDATA[null@example.com (nicedream)]]></author>
			<pubDate>Tue, 05 Apr 2022 15:01:16 +0000</pubDate>
			<guid>https://forum.cannylogic.com/viewtopic.php?pid=964#p964</guid>
		</item>
	</channel>
</rss>
