Home AMX User Forum AMXForums Archive Threads AMX Hardware

Landmark Primer

Greetings...trying to work up a proposal to upgrade an old Landmark system with either new functionaility or an NI-3000 and have a couple of questions for you Landmark experts.

1) How do you (or can you) parse incoming information from a serial device? I see how to send a command and how to define an event to occur on specific incoming data, but it looks like the incoming packet has to match the event string exactly as defined, can't find documentation on specifying an input definition where variable data may be received. Also, in programming the event I don't appear to have the option of selecting this device (or event string) as Input into my user defined variable.

2) This system has a Vantage PhastLink connection which I can find zero documentation on. If you have used this, did it come from AMX or Vantage, and will it support Vantage thermostats?

More than likely we are going to upgrade, but I can't stand being stumped, so any help is appreciated.

Thanks for the help...Sonny

Comments

  • DHawthorneDHawthorne Posts: 4,584
    Incoming data on the STRING handler of a DATA_EVENT doesn't need to be exact. You can parse it and analyze it like any string. I use the FIND_STRING function regularly for that purpose. In most cases, you aren't going to want to work directly with that handler, though. Create a buffer variable big enough to handle your incoming data and to hold whatever it will need to while you are processing it. Then use CREATE_BUFFER in your start section to link it to a serial port. That variable will now hold all the data that comes in through that port. Most protocols use some sort of packet delimiter these days, and you can use REMOVE_STRING to strip packets out of the buffer and process them. You can then use your STRING handler to lauch a function or CALL to check for a packet and process it. Or you can trigger it from mainline on detecting data in the buffer (LENGTH_STRING) or the presence of your delimiter (FIND_STRING). I prefer using mailine for this as the mechanics of what triggers a STRING handler in the DATA_EVENT are not published in enough detail for me to feel confident I won't miss data if I depend on it.
  • sonnysonny Posts: 208
    Thanks Dave...although I may have not quite made my question clear. Trying to figure out how to accomplish this using Landmark Designer 4.1 coupled with a Phast MCU-based system.

    ...Sonny
  • DHawthorneDHawthorne Posts: 4,584
    Oh, I thought you were already on the upgrde to NetLinx :)

    Yeah, Landmark strings have to be exact, there is no parsing ability. I have been able to get some psuedo parsing out of them in the past by creating events for individual characters, and stringing together long convoluted conditionals as they come in - but that is ugly, time consuming, and only practical for a very limited command set. Somewhere out there, they must be an API for writing drivers for the various Phast Converters that are out there, but I don't know that Phast ever released them to anyone but manufacturers.

    As for those Phastlink converters, they come from the manufacturer of the interfaced equipmet, but Phast used to have the "modules" for interfacing them to Landmark. I have no idea where you can get them from now, but make sure it isn't already in your copy of Landmark, many of them were.
  • sonnysonny Posts: 208
    Thanks...that's really the answer I was looking for. Putting a Netlinx in will solve several problems this client has as well as give us the capability to do some cool stuff for him in the future.
  • Landmark Primer

    Sonny,

    Dave is too kind when describing incoming string handling in Landmark :). I have coded a number of complex Landmark systems and inevitably the single largest drawback for me has been the inability to easily parse incoming string data from serial devices that did not have a SAM module for them. I tried (unsuccessfully) to get AMX to release a SAM developers kit some years ago so that qualified Landmark developers could build 2-way RS232 device interface SAMs for those devices that were not in the P3 program. It is difficult to build any kind of robust string handler for incoming string data in Landmark even though it is pretty simple (yet clumsy) to construct and send outgoing strings. Then again, Landmark was not designed to be an open and low-level development environment so it is hard to be overly critical. The problem was that as support for P3 and new SAM modules for emerging devices began to decline as Landmark was being phased out, you were left little option but to upgrade to Netlinx. The lack of support for any type of Ethernet/IP device control also sealed the deal for me.

    Regarding the Vantage interface, I do not believe that the Zoom module for the Vantage system was ever included as part of the standard Landmark distribution. In fact, it is one of the handful of PMB-SAM devices and Zoom modules that had to be purchased from the manufacturer and not from AMX (like Jandy Aqualink, Lutron Homeworks, ...). The Vantage SAM was noted on the 2003 AMX price list but could only be purchased from Vantage. Like you, I have absolutely no documentation on this module. That is however not unusual since the command set provided by the Zoom that is visible once the module is added to a Landmark project is generally all the documentation one would get!

    Upgrade to Netlinx .....

    Hope this helps,

    Reese
  • shr00m-dewshr00m-dew Posts: 394
    The Vantage model is built into Landmark, no zoom file needed. Goto File/program properties/supported manufacturers. Check Vantage and you'll have a new 'group' to drag stuff out of. Due to a poor ground design on the module, you will need to have an opto-isolator in line with the serial or you will not get reliable feedback.

    Kevin 'glad to out of Landmark' D.
  • sonnysonny Posts: 208
    Thanks for the help...

    Sonny
Sign In or Register to comment.