Jump to content

ned

Members
  • Posts

    571
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by ned

  1. QUOTE(Thang Nguyen @ Sep 17 2007, 05:04 PM) I feel fairly confident in saying that your NI engineer is mistaken, since I've done exactly this using an FP-2010. I suspect that the NI engineer thought you were asking about direct Modbus access to the modules (or using OPC) which I believe is possible with the 18xx. It is worth using the Modbus I/O server on the Fieldpoint module as it is much easier to use than the Modbus library. You asked about a similar situation in another thread; did you ever resolve whether your shared variables were working properly, independent of the Modbus binding?
  2. I've just started a new job that is asking me to use LabVIEW in a different application than I've programmed in the past, and I'm looking for suggestions. I'm working on a system that has several stations around an index wheel. At one station a vial is filled, then rotated to the next station where the contents are verified, then the vial is capped, etc. I'm trying to decide what software architecture to use for this. My original thought was that each station would act as its own subsystem, and communication would occur using two notifiers: the index wheel system would send one notification when it is in position, and each other subsystem would send a notification back when it completed (indicating success or an error). However, there is an existing system here already that uses PLCs and a sequencer (perhaps I have the term wrong) that rotates through a circle each cycle and triggers outputs across all subsystems along the way (one output might turn on at 5 degrees, another at 30 degrees, etc), which makes it easy to see when something goes wrong because it is possible to step through it by advancing the sequencer more slowly. I'm considering using a similar technique in my LabVIEW code. Does anyone have experience with a similar system, and if so, can you comment on your experience? Did you use one of these two approaches or something else entirely?
  3. QUOTE(Thang Nguyen @ Sep 12 2007, 01:33 PM) Unfortunately I don't have access to a FieldPoint module to test this. I just switched jobs, and the last thing I did at the previous company was to set up Modbus communication over a serial link between a FieldPoint module and an autodialer - and it worked. However I was testing this using the configuration tool for the autodialer, which let me read the Modbus values directly. This looks to me more like a shared-variable problem than a modbus problem, since you aren't verifying modbus communication. Have you checked for an error in the error-out clusters? Do you have the Shared Variable Engine and whatever else it needs installed on your FieldPoint module? It looks like you're hosting the StopFP1 variable on your computer; does that work? What happens if you instead host both variables on the FieldPoint module?
  4. QUOTE(Thang Nguyen @ Sep 10 2007, 12:54 PM) It would be easy to combine all the modules into one modbus server because FieldPoint IO items are treated identically regardless of whether they are local (directly connected to the network module) or remote. You could put all your shared variables, bound to a Modbus I/O server, on one of your Fieldpoint modules, and let that module retrieve data from all your other modules over your ethernet network. You'll only need code on one module, and all the other other modules can have "dumb" network interfaces (the cFP-1804/1808).
  5. QUOTE(abuch06 @ Aug 9 2007, 10:12 AM) http://forums.lavag.org/index.php?act=attach&type=post&id=6579''>http://forums.lavag.org/index.php?act=attach&type=post&id=6579'>http://forums.lavag.org/index.php?act=attach&type=post&id=6579 A typecast node coerces data from one type to another, so long as as the representations in memory are compatible. For example, you can take an array of U16 and typecast it to an array of U8 (the array length will be doubled), because a U16 in memory is stored identically to two consecutive U8s. See the help for more details.
  6. No, but if your array consists entirely of fixed-size types (booleans, numerics, and clusters containing only those types), then you can use a typecast node to convert the array to a cluster without having to set the number of elements.
  7. The LabVIEW help says that you can assign a port to a specific network card, but you are not required to do so. If you do not, it will listen on all available interfaces. Take a look at the help for TCP Create Listener and UDP Open, specifically the "net address" terminal.
  8. QUOTE(i2dx @ Jul 5 2007, 09:11 AM) The error message you're seeing is accurate. The 9004 allows DMA transfers only from FPGA to RT, not the other direction. Host to Target DMA is a new feature of the 9012/9014 cRIO controllers and is not supported on the older controllers.
  9. QUOTE(DDAdevil @ Jun 20 2007, 11:48 AM) It's not quite clear what you want to do here: will each of the networked computers display exactly the same data, or do the networked computers each need access to the data so they can act on it differently? For the first case, any of the remote viewing options mentioned (Remote Desktop, Remote Front Panels, VNC, etc) will work. If you don't like any of those options, or your needs fall under the second case, I'd suggest that you split your code into two parts: 1) a server that reads your DAQ data, accepts connections, and responds with the acquired data, and 2) a viewer application that retrieves data from the server. You can use shared variables, DataSocket, or a custom TCP or UDP protocol to distribute the data to all instances of the viewer application.
  10. QUOTE(Aristos Queue @ Mar 28 2007, 10:30 PM) Slightly off-topic but related: if you can constant-fold a single-iteration while loop, does this affect buffer allocations at tunnels into and out of those loops? I frequently pass a cluster into a single-iteration while loop, replace an element, and then pass the cluster back out again. I've started using shift registers in place of tunnels in this situation to avoid buffer allocations. Will LabVIEW optimize this for me even if I use a tunnel, because it knows the loop iterates exactly once?
  11. QUOTE(Gary Rubin @ Apr 16 2007, 02:20 PM) You can't have an array of arrays, so instead you get an array of clusters, with each cluster containing an array of doubles. The array elements in the queue could all be different lengths, so it would be impossible to merge them into one 2-D array.
  12. Rings can have any numerical representation and any set of values; enumerations must be consecutive non-negative integers. I often use rings for constants like bit masks where there may be a gap between values.
  13. QUOTE(LV Punk @ Mar 27 2007, 01:04 PM) Ah, my misunderstanding of what you were trying to say. I always think of enumerations fundamentally as numbers, not as strings, even though I regularly take advantage of the ease of converting between them, and I thought you were trying to say that there was some difference between flattening an enumeration to a string versus flattening its numerical equivalent.
  14. QUOTE(BrokenArrow @ Mar 26 2007, 08:57 PM) I doubt you'll see any problems using these VIs, but if you're really concerned about a speed impact you might want to set them to "subroutine" priority.
  15. QUOTE(LV Punk @ Mar 27 2007, 06:53 AM) The "Flatten to String" is irrelevant here, because the type information (the names of the enumeration items) is available on the receiving side when you unflatten, through the enumeration constant. In fact, the type information isn't even included in the string. Put a probe on the output from "Flatten to String" and you'll see this; if you're not convinced, convert the enumeration to a U16 and note that you get the same result.
  16. QUOTE(LV Punk @ Mar 12 2007, 10:21 AM) There's http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html' target="_blank">this one for validating an email address.
  17. QUOTE(ned @ Jan 25 2007, 01:44 PM) I just started suffering from this problem again . As far as I know our IT department didn't change anything, but I did just install the FPGA toolkit and RIO module. Do you use these toolkits? I wonder if there's a connection.
  18. ned

    Data Buffering in 8.2

    QUOTE(EJW @ Feb 20 2007, 09:25 AM) This handles multiple channels just fine. The reason for converting to a 1-D array is that "Split Array" only works on 1-D arrays, and I use that to split the incoming data when it "wraps around" the end of the buffer. Here's one way you could use this: let your end-of-test condition stop the while loop. Outside the while loop (after the test completes), take the value from the shift register (the entire buffer). Rotate the array based on the index value in the other shift register so that the beginning of your 5-minute period is at the beginning of the array. Reshape the array back to 16 channels and you have your 5 minutes of data. EDIT: Here's the algorithm. The DAQmx task is set up for continuous acquisition. DAQmx read returns an unknown number of samples. Transpose the array of samples, then reshape to a 1-D array. Subtract the current location in the buffer (the integer shift register) from the total buffer size, and split the array of new samples at that point. Normally, the first array will contain all the data, and the second array will be empty. However, if the current location in the buffer is near the end of the buffer, then we need to wrap around and write the remaining data to the beginning of the array. The new buffer location is the previous location added to the number of new samples, unless we wrote data to the beginning of the buffer, in which case the buffer location is the number of samples written to the beginning of the buffer. Try this with a 2-D array and you'll find it's harder to split the buffer in the right place.
  19. ned

    Data Buffering in 8.2

    QUOTE(eaolson @ Feb 19 2007, 02:55 PM) Here's an implementation of this that I wrote, extracted from a larger VI. It stores all channels of data as a one-dimensional array. When your trigger condition occurs, you'll need to do a rotate array (or some other trick) to get the segment of data you want, and then reshape array to get it back into two dimensions. I don't think this makes unnecessary memory allocations, and I'd welcome comments and suggestions. http://lavag.org/old_files/monthly_02_2007/post-3989-1171924246.gif' target="_blank">
  20. It's not an XNode, but couldn't you do this with "Variant to Data"? Wire "anything" to "type" and an empty variant constant to the variant input.
  21. Oops, then you've got a duplicate; NI support sent me CAR #45PCAHGF.
  22. I no longer have this problem. I'm not certain if the fix was the change in the network drive or something else, as I don't remember exactly when I stopped seeing the error.
  23. Here's what IT tells me they changed: "Before you were going to \\server03\username$ now you are going to \\server04\users\username where it's not a security issue more so a UNC Path. We were using: Windows Storage Server 2003 and now we are on Windows Storage Server 2003 R2"
  24. Before I report this to NI, would someone verify that this is incorrect behavior? See the attached VI and block diagram. I have a queue containing a variant. Sometimes the element in the queue has an attribute named "loop" and sometimes it doesn't. If the "loop" attribute does not exist, and the Default Value terminal is left unwired, the attribute value will be whatever it was the last time that attribute existed. If Default Value is wired to an empty variant constant (which should not be necessary, according to the documentation), then it works as expected. Download File:post-3989-1169665735.vi
  25. Try this: place a case structure on a block diagram. Put a "VISA GPIB Control REN" node inside it. Right click on the "mode" terminal and choose "Create -> Constant." The constant appears on top of the case structure, rather than inside it. If you drag the constant away from the case structure, it appears to have a valid wire, but doesn't.
×
×
  • Create New...

Important Information

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