Jump to content

bradjb911

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by bradjb911

  1. Clever Trick Thanks...I may incorporate that into my program.
  2. Hello y'all, I have a there must be a better way question. Here's what I'm trying to do. Build a system which takes inputs serial strings encoded with address from different things. Which will say the states of those things. Then it will take the data it learns and respond with serial commands. Basically, one light turns on, phones home and so Labview responds by turning on another. What I'm wondering is if anyone has any advice on how to architect the program. I'm planning on a loop of: Serial Data In -> Analyze Data -> Update States -> Calculate Necessary State Changes -> Send Appropriate New Serial Commands -> Rinse and Repeat My biggest holdup is book keeping my state updates according to the right addresses. Any suggestions. I'm currently thinking a 2-D Array or maybe several 1-D Arrays and doing a string match. Thanks in advance! Brad
  3. Thanks for your help guys. The problem ended up being on the Zigbee side of the device; something I thought I'd eliminated. However your advice was useful for troubleshooting! Brad
  4. When the receiver is set to 20 bytes then you receive, after sending the message the second time: 7E00 0E90 0013 A200 403C 87B5 0000 0168 6930 7E00 Note the 7E00 on the end is a repeat of the beginning. In other words it looks like it takes two messages to fill up the 20 byte buffer and output a response. Whereas with an 18 byte buffer the response is output immediately with just one transmission. As to incorrect Serial settings: The serial settings have been confirmed by running an outside terminal program (X-CTU) to receive the information. Also, in my experience incorrect port settings cause much more havoc on the data. Though if you throw enough 1's & 0's in a pot I suppose anything is possible.
  5. Hello, I'm working with the Zigbee API interface and running into some trouble with the serial communication. Before I begin to explain my problem, let me apologize if I misuse the bits/bytes terminology. I'll try my best and I'll try to give examples alongside the terms. Here is the summation of the problem: The controller sends 20 Hex bytes (accurate sending confirmed by reading with another zigbee): 7E 00 10 10 01 00 13 A2 00 40 3C 87 B4 C8 FD 00 00 68 69 EC Labview reads: 7E00 0E90 0013 A200 403C 87B5 0000 0168 6930 It appears that my ones and zero bits are getting jammed together in the background and turned into 16-bit numbers (FFFF) instead of 8-bit numbers (FF). So how can I tell labview to read the 8-bit version? My code is attached. Thanks lots!
  6. I rewired again and ran the two switches between the +5v and the digital inputs. Everything works. Thanks.
  7. I rewired the circuit adding in the D GND. The circuit goes like this: Two magnetic switches. One end of both switches attached to the +5V. The other ends are attached to AI 2 and AI 4 respectively. AI 10 and AI 12 are connected to D GND with a wire. The result is that when the circuit on either switch is opened both AI 2 and AI 4 jump up to 5V. When the circuit is closed both drift around. They also always read the same values. There is no capacitance in the switch. I'm assuming somewhere there's a ground loop problem but I can't find it. I want my circuit to go to 5v when on and 0v when off. Thanks, Brad
  8. I am trying to get labview to detect a toggle using a magnetic switch. I am hooking it up to an SCB-68 and want to use the +5v connector to feed a simple on/off into labview. What I'm having trouble with is figuring out how to connect it to the SCB. I've run one end to +5v and the other to 28-AI4, but this doesn't seem to work. (by reading voltage through the DAQ assistant) I wonder if anyone has experience running simple switches through labview and could offer some tips. Thanks, Brad
  9. I would like to create a Word report with Labview which has some header information text (title, date etc.) and then about 200 pictures added on...with 16 pictures per page. The images are generated by my current code and dumped into a folder. I'm envisioning that there is something like New Report -> Add Title -> Add picture and then when stuck in a loop the images populate the report as they are being generated. Any suggestions? Thanks!
  10. Thanks you guys, you knocked the question out of the park. Brad
  11. Hello, I am working to build a data analysis system and having a little trouble with the arrays. I just want to reduce the data like below. Example 2D array: [ 1 3 5 7 2 4 6 8 1 3 5 7 ] Into 1D Array: [ 1 3 5 7 2 4 6 8 1 3 5 7 ] I've been working on this for a couple of hours and it seems like a simple problem, but I'm not beating it yet. Thanks, Brad
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.