<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Triggering TimeSync to end devices"]]></title>
		<link>http://forum.infiniteautomation.com/forum/posts/list/13.page</link>
		<description><![CDATA[Latest messages posted in the topic "Triggering TimeSync to end devices"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Triggering TimeSync to end devices</title>
				<description><![CDATA[ I am trying to figure out the easiest way to send a command once a day to trigger a time update on my arduino devices. I can manually do it and now I want to automate the write to a modbus register. I created a scheduled event via CRON and not sure how it can be used to trigger a softpoint to create a time stamp and write it to a setable modbus register.]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/1432.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/1432.page</link>
				<pubDate><![CDATA[Fri, 19 Feb 2010 00:44:38]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ Check out event handlers. Find your scheduled event and then use a set point handler to set the value of your modbus point.]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/1435.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/1435.page</link>
				<pubDate><![CDATA[Fri, 19 Feb 2010 10:10:23]]> GMT</pubDate>
				<author><![CDATA[ mlohbihler]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ What I ended up doing was setting a softpoint to contain the epoch in local time based on a CRON pattern. e.g. every 10 seconds. I can't think of another way to get the current timestamp to use in the event handler.<br /> <br /> <br /> I used the schedule to fire once a day to feed an event to set the time into the given setpoint to be sent to the slave.<br /> <br /> What I wanted was to use the softpoint to do it. e.g. CRON once a day, then set the the time for all slave devices. e.g. p.value = timestamp. Alas, this cannot be done at the softpoint level. It seems I have to create a schedule time event for each slave, then a event handler for each schedule event. <br /> <br /> Another option is that I can change the arduino code to deal with slave ID of 0 and implement a broadcast write. Will Mango deal with broadcasts and if it does what doe it expect back?<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/1444.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/1444.page</link>
				<pubDate><![CDATA[Fri, 19 Feb 2010 15:48:45]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ Modbus4J, the underlying modbus implementation, supports broadcasts, but not Mango itself.]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/1463.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/1463.page</link>
				<pubDate><![CDATA[Mon, 22 Feb 2010 12:25:50]]> GMT</pubDate>
				<author><![CDATA[ mlohbihler]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ The Mango datapoint entry UI is set to accept a slave address of 1-240 so if I understand your reply, Mango cannot support modbus broadcast without changes to the application layer of Mango?<br /> <br /> I suppose hack my ardiunos to take address 1 as a "broadcast" rather than the standard 0 address and hardcode only one device to send a response back.<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/1479.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/1479.page</link>
				<pubDate><![CDATA[Sat, 27 Feb 2010 11:46:57]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ @chrapchp - I was wondering what modbus library you use for your Arduino. I've been using this one:<br /> <br /> <a class="snap_shots" href="http://sites.google.com/site/jpmzometa/arduino-mbrt/arduino-modbus-slave" target="_blank" rel="nofollow">http://sites.google.com/site/jpmzometa/arduino-mbrt/arduino-modbus-slave</a><br /> <br /> It works OK to get data, but when I try to set data I get an error message. Probably the modbus command used isn't supported by the Arduino library. Looks like you use one that does.<br /> <br /> (sorry for being a bit off-topic here)]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/1537.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/1537.page</link>
				<pubDate><![CDATA[Wed, 10 Mar 2010 10:12:07]]> GMT</pubDate>
				<author><![CDATA[ Andras]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ Update: the slave side of Modbus4J supported broadcasts, but there were problems on the master side. The library has been updated to fully support broadcasts now. Changed code has been checked into the CVS repo.]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/1539.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/1539.page</link>
				<pubDate><![CDATA[Wed, 10 Mar 2010 10:21:22]]> GMT</pubDate>
				<author><![CDATA[ mlohbihler]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ I used that one as well.  It does not have a modbus function 6 which is what is sent out from Mango. I hacked a function 6 in the arduino and I can write to it now.  It is not pretty and plan on create a class someday to abstract the communication layer. <br /> <br /> <br /> <br /> <br /> ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/1540.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/1540.page</link>
				<pubDate><![CDATA[Wed, 10 Mar 2010 10:25:14]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ OK, thanks for the tip. I also added function 6 and I can now set points too  <img src="http://forum.infiniteautomation.com/forum//images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" /> I also made the whole thing into a separated Arduino library (which was something that needed to be done anyway). <br /> <br /> I also added code to make it easy to check which registers were changed by the master.<br /> <br /> I'll ask jpmzometa if he wants to include the changes.<br /> <br /> (Again, sorry for being off topic here)<br /> ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/1580.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/1580.page</link>
				<pubDate><![CDATA[Fri, 12 Mar 2010 16:55:40]]> GMT</pubDate>
				<author><![CDATA[ Andras]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ Great. It is nice when progress is made.<br /> <br />  I transfer write registers to separate variables. If I need feeback of a write I use seperate read registers. That way I know my embedded code is performing correctly.<br /> <br /> I will be hacking a broadcast as well for my nightly time syncs. Slave ID of 0 is not allowed from the ui. I will pick one arduino to respond to an address 1 request while the others are passive and used that as my broadcast address.   ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/1581.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/1581.page</link>
				<pubDate><![CDATA[Fri, 12 Mar 2010 19:49:41]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ Hello.<br /> <br /> How can I send time and date to all arduino slaves with mango and modbus rtu?<br /> <br /> Is it possible?<br /> <br /> Thanks]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3692.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3692.page</link>
				<pubDate><![CDATA[Tue, 1 Mar 2011 18:00:26]]> GMT</pubDate>
				<author><![CDATA[ jose francisco]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ You can't set the broadcast address of 0 on the mango UI. If you want to work with the existing code base, select another address say 1 as the "broadcast" address.  Not sure what you have for modbus implementation on the arduino side but probably is minimalist and probably does not have broadcast handling capabilities. I am assuming you got what was floating around for free. I had to add modbus functions on the arduino side to do what I want. I did not do broadcast functionality but it should not be too hard to implement.<br /> <br /> I would change the code to handle a "broadcast" address and have only one device respond to a request to the master and the others are passive listeners. That way only one entry is required on the Mango side along with a CRON event to trigger write the timestamp. <br /> <br /> Otherwise you could probably use Mango events to fire off to write the date/time as a unix epoch timestamp or what ever format you want to send to registers in Modbus and manually configure a date/time point for each device. That would emulate a broadcast.<br /> <br /> Not sure if that helps.]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3704.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3704.page</link>
				<pubDate><![CDATA[Sat, 5 Mar 2011 22:12:43]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ I'm using this library in arduino.<br /> <a class="snap_shots" href="http://sites.google.com/site/jpmzometa/arduino-mbrt/arduino-modbus-slave" target="_blank" rel="nofollow">http://sites.google.com/site/jpmzometa/arduino-mbrt/arduino-modbus-slave</a><br /> It doesn't implement broadcast messages. I was talking with the writer but he is busy to add that feature.<br /> <br /> He says that there is no reply from slaves for a broadcast message.<br /> <br /> It's very interesting to add broadcasting to the library but my C++ knowledge isn't good enough.<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3705.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3705.page</link>
				<pubDate><![CDATA[Sun, 6 Mar 2011 02:59:34]]> GMT</pubDate>
				<author><![CDATA[ jose francisco]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ <br />  That is the one I used and modified on my own for my own consumption last year.  Even if you add a broadcast in the arduino code, the UI on the Mango side won't let you add a broadcast address of 0. So elegant changes or a hacks needs to be made, hence my suggestions.<br /> ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3706.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3706.page</link>
				<pubDate><![CDATA[Sun, 6 Mar 2011 04:12:49]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ The writer of the library told me to make myself the changes and add them to the official release.<br /> If you send the changes he will add them in the web page.<br /> <br /> About Mango modifications... Is there any answer from Serotonin? ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3707.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3707.page</link>
				<pubDate><![CDATA[Sun, 6 Mar 2011 12:25:23]]> GMT</pubDate>
				<author><![CDATA[ jose francisco]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ [quote=mlohbihler]Update: the slave side of Modbus4J supported broadcasts, but there were problems on the master side. The library has been updated to fully support broadcasts now. Changed code has been checked into the CVS repo.[/quote]<br /> <br /> Modbus4J works with broadcast, Mango not. Am I right?]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3708.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3708.page</link>
				<pubDate><![CDATA[Sun, 6 Mar 2011 12:27:20]]> GMT</pubDate>
				<author><![CDATA[ jose francisco]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ There are several options presented in thread. If you don't feel comfortable with the C++ or looking at the Mango code, as stated earlier you ca create an event to write to each of the registers in your arduiono with a UNIX epoch timestamp from Mango. <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3709.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3709.page</link>
				<pubDate><![CDATA[Sun, 6 Mar 2011 17:14:17]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ Yes. Send time to every slave is the way I was using in the pass. I was wandering a better way to do it.]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3711.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3711.page</link>
				<pubDate><![CDATA[Sun, 6 Mar 2011 23:40:48]]> GMT</pubDate>
				<author><![CDATA[ jose francisco]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ It gets difficult if you don't feel comfortable changing the modus C++ code on the arduino side. The code is easy to follow and change. ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3712.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3712.page</link>
				<pubDate><![CDATA[Sun, 6 Mar 2011 23:47:13]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ have you made the changes in the arduino library?]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3713.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3713.page</link>
				<pubDate><![CDATA[Sun, 6 Mar 2011 23:49:16]]> GMT</pubDate>
				<author><![CDATA[ jose francisco]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ yes but not for those you want. If I get a chance I implement the change I suggested, but don't have much in terms of cycles so can't give a time. <br /> <br /> ]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3714.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3714.page</link>
				<pubDate><![CDATA[Sun, 6 Mar 2011 23:56:24]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
			<item>
				<title>Re:Triggering TimeSync to end devices</title>
				<description><![CDATA[ Don't worry. Sure you are faster than my C++ skills]]></description>
				<guid isPermaLink="true">http://forum.infiniteautomation.com/forum/posts/preList/311/3715.page</guid>
				<link>http://forum.infiniteautomation.com/forum/posts/preList/311/3715.page</link>
				<pubDate><![CDATA[Mon, 7 Mar 2011 00:01:50]]> GMT</pubDate>
				<author><![CDATA[ jose francisco]]></author>
			</item>
	</channel>
</rss>