Jump to content

longzoo

Members
  • Posts

    27
  • Joined

  • Last visited

Posts posted by longzoo

  1. I have an application where i need to send a variable DC voltage output (from 50-250mV) then time when an event happens after the voltage is applied. I envision a switch tied to a DO then measure the time to the DI event. Some of these events will occur within 1ms of the output event. Can anyone suggest hardware that is capable of this kind of timing?

  2. ding dang it...It's still latching up. I found that the version of devcon.exe i was using was a tad old and when i downloaded the new WDK (version 8.1) i was able to disable, enable, rescan and restart, however LabVIEW still won't allow me to use the port until i completely quit LV and come back in :(

    Any other thoughts? 

  3. Thanks for the reply viSci, I  downloaded, installed and ran devcon.exe both manually (right click>>run as administrator) and with system exec.vi.  Either way when i run VISA configure...vi I still get a -1073807330 occurred at Property Node..... I seem to be missing something here :(

  4. I have a USB device that I need use with COM drivers as well as D2XX. In order to switch between the two drivers a registry edit has to be made (which is no small feat for Windows 7 and the many levels of permissions). At times I have to switch from COM to D2XX, send some commands then switch back to COM. As expected, when i switch to D2XX i notice my COM port disappears from Computer Management then swiching back to COM it reappears. HOWEVER, after this point I can no longer run "VISA configure Serial Port (Serial Instr).vi" without the -1073807194 property node (arg 8).... error. 

    I found in LAVA that arg 8 has to do with the flow control but regardless of the flow control setting i cannot make it pass. The only way to get VISA configure to run is to close LabVIEW COMPLETELY then reopen it. 

    I also read that the arg 8 error can be caused by a hub so I moved the USB to the side of the computer rather than the monitor to no avail.

     

    Can anyone tell me if LV is holding that port somehow, and how i can make it release?!? I have attempted to run VISA close as well as FT_Close_Device but nothing short of a complete closure of LabVIEW seems to work. 

    Thanks,

    Dave

  5. Thanks Mellroth!

    That was it....i did a "search and replace" for 0x5C with null on both strings and it is working now...although i see a new folly in the way we do this, there are many characters we will inadvertently hit since our string is any combination of hex characters 0x3F (?) 0x2E (.) etc.  

    Thanks for the info 

    Dave

  6. Hello all,

    I am having an interesting problem that i finally traced down to the simple little "match pattern" vi. I inherited many programs that use that vi for everything from pulling a single character out to sorting a huge list from a text file (neither of which i advocate).  HOWEVER, I was troubleshooting some code that only showed an error in one specific situation and upon delving in I found this vi to be misbehaving, or more likely I misunderstand how it is behaving ;-)

     

    The vi has to remove an echo command then display the response. it goes like this  i send 0xABCD and read back 0xABCD1234, i need to display 0x1234. I did a workaround where i read the number of bytes sent then use that as an offset for "string subset" vi. but i am curious why "match pattern" is not working for this one hex command .

     

    Please see the attached vi. that will show two hex commands, one that works and one that does not. You will notice both sent commands have 14 bytes and match the first 14 bytes of the reply, both show a match if you pull the first 14 bytes of the reply but only one matches with match pattern...it is written with LV 2011 SP1.

    Thanks for looking.

    Dave

    MatchProblems.vi

  7. NOTE: while typing this up i found my solution but decided to post anyway in case it may help someone else

     

    I decided to quit beating my head off the keyboard and ask for help...I have a vi that will eventually be an .exe distributed across a variety of windows xp to windows 7 machines (32 and 64 bit). In this vi a bunch of data is saved to a .tsv file at C: i then need  to open the .tsv file in excel. After some searching i found System Exec.vi. it initially seemed to be my silver bullet because if i open command line in windows and type " excel.exe c:temp.tsv" Excel is opened (and this should work across different versions of Office). BUT with system exec.vi i get an error "Error 2 occurred at System Exec.vi Command was "excel.exe c:temp.tsv" Possible reason(s): LabVIEW: Memory is full." blah blah blah...

    If i replace "excel.exe" with Notepad it opens the data no problem with notepad but i need it to be in Excel. i read about using "cmd /c" and attempted to no avail

     

    Here's where i found my issue... it is "cmd /c" NOT "cmd c" ! so i used "cmd /c c:temp.tsv" and voila it opens with the default program for .tsv (which is obscure enough that i can make Excel a default on all of the computers in the building) for some reason cmd /c excel.exe does not work to open excel. i found this odd as excel.exe entered directly in the command line will open excel regardless of which version you have installed, but i believe i can live with this. 

  8. Thanks for the response,

    First the easy questions...the baud rate is 9600, the 70 ms is added between a visa write and a visa read in my subvi. As far as multiplexing I don't think that is necessary as I specify an address when I "visa write". Then when I read the buffer the only thing there is the reading from that address. I don't think there is a "read all" command.

    I determined the read time from multiple reads of all 5 sensors that i have into an array, ie. write to address 1, read ->to array; write to adress 2, read->to array; etc. when i ran that 100 times i got 500 readings and when i averaged it I still got ballpark of 170ms.

    I am not trying to split hairs here, a 500ms delay would be fine but when constantly reading the two sensors and displaying on the front panel you can cover a sensor and count... one-mississippi-two-mississippi then the bar drops.

    I am starting to suspect that the delay is in the meter itself before it sends the data to me. I will do some more experimenting today and let you know.

    regardless, thanks for the info and especially the "unrelated things" I am always open for suggestions on how to clean up my code :) !

  9. I am working on a project that requires alignment of a light source. There is two light meters sitting 45 degrees from one another and when they both see the same amount of light the fixture is aligned. I have a sub-vi that reads the light meters with approx 70ms execution time but when i put them in a loop and read continuously to a set of graduated bars there is considerable lag (more than a second). I put a tick counter to determine loop time which is around 170ms. any ideas on why the long lag?

    FrontPanel

    BlockDiagram

  10. many thanks Yair!! i put the line right below showTipStringsOnTerms=False and voila, no more popups!

    And yes, jcarmody, it certainly is a lot of local variables, you should see the rest of my vi! I've never had any formal LV training and am more of a design engineer than a programmer. I find that locals are the easiest way for me to get stuff done. yes, my code may not look pretty but it typically works (after a couple debug sessions ;-P )

    • Like 1
  11. I have a small annoyance that is getting increasingly painful. When i hover over a structure block like True/False or 0..x, i get a popup that says "Selector label". This frequently covers a portion of my code, especially when i'm on small screens where my structures are really crammed. (see jpg) I really want to disable the popup but I dont even know what to call it to search how to disable it. i thinkk this has been around for quite awhile but i am currently using LV2011.

    many thanks for a nudge in the right direction!

    Dave

    post-10057-0-52248100-1323354242_thumb.j

  12. i believe i had this posted in the wrong category last week so i am reposting here.

    i am troubleshooting a test set that has, among many other instruments, three Fluke 8846A multimeters being controlled by GPIB. I am running LabVIEW 2009SP1. The canned vis from Fluke threw many errors so i decided to go as simple as possible and send the following commands from a subvi:

    :TRIG:DEL:AUTO ON;:TRIG:SOUR IMM; :TRIG:COUN 1; INIT; FETC?

    These commands set auto trigger delay on, triggered immediate, set trigger count to 1, sample count to 1, initiate, then got the reading.

    i then read 64 bytes back and converted it to a double.

    i call this subvi a few hundred times in my main routine. many times i get completely through the main program without issues but occasionally i will get the attached errors (see jpg). this needs to be an automated test set that runs overnight wihtout human intervention. does anyone know a way i can auto-acknowledge these errors to allow the program to run? or better yet, anyone have ideas on why i randomly get this error to begin with??

    i have attached my subvi as well.

    DJL_Fluke8846A_read_instR2.vi

    post-10057-0-09933500-1306149330_thumb.j

  13. i am troubleshooting a test set that has, among many other instruments, three Fluke 8846A multimeters being controlled by GPIB. I am running LabVIEW 2009SP1. The canned vis from Fluke threw many errors so i decided to go as simple as possible and send the following commands from a subvi:

    :TRIG:DEL:AUTO ON;:TRIG:SOUR IMM; :TRIG:COUN 1; INIT; FETC?

    These commands set auto trigger delay on, triggered immediate, set trigger count to 1, sample count to 1, initiate, then got the reading.

    i then read 64 bytes back and converted it to a double.

    i call this subvi a few hundred times in my main routine. many times i get completely through the main program without issues but occasionally i will get the attached errors (see jpg). this needs to be an automated test set that runs overnight wihtout human intervention. does anyone know a way i can auto-acknowledge these errors to allow the program to run? or better yet, anyone have ideas on why i randomly get this error to begin with??

    i have attached my subvi as well.

    post-10057-0-79256300-1305833856_thumb.j

  14. Hello all,

    I am trying to get a vi together to write periodic messages to and read from a CAN bus via a Gridconnect USBtoCAN adapter. I installed NI-CAN but cannot get MAX to report any CAN channels. When i try to create a channel i am faced with parameters that I don't know...what i need to do is send a 0x01 or a 0x02 to ID 187. then every 300ms or so send 0x00 to ID 2CE. I will be reading from several IDs but I think once I can get the initial writes out there I can figure that portion out...I have been using "PcanViewUsb.exe" provided by Gridconnect to do the messaging but would like to make a vi to interpret the bytes to meaningful data... I am attaching a jpg of the data i am currently reading and writing.

    Any nudges (or shoves) in the right direction would be greatly appreciated!

    Dave

    oh yeah, and every time I try to make a channel and open a test panel I get the error "The TestPanel cannot run since no CAN ports are available. Be sure to have at least one NI CAN card inserted into your computer"

  15. Hi all,

    I am using LV 8.2 and am faced with an interesting problem (probably simply solved). I am using a USB-9162 carrier with an NI9211A thermocouple reader. I can take readings from it with no problem but when i go to display the data on a graph :/

    The graph i used will keep a specific amount of data, say 100 readings before the older data "drops off" the left side of the graph. What i am looking to do is have the x axis expand as more data is brought in, similar to the way the y axis can autoscale...

    Sometimes our guys are monitoring 10 minutes worth of data (low speed 1 reading per second or so) and they can need as much as 5 days worth, in which case the frequency of readings are around 0.02 hz.

    Any ideas on me getting these guys all of their data on one chart without making them close the vi and open the data file to graph it...

    thanks!

    Dave

  16. Hi Siva,

    I am attempting to use your EtherNet_IP_PCCC.zip files to communicate with a MicroLogix 1500. My problem is with writing to the PLC. I made a small test vi that uses your init, update registers, scan registers, and terminate vis. If i write a value, say 1F3A, to offset 0 all is well. I can read the 1F3A in the register array with no errors. But if i try to write to any other offset, say 2 or 4, i get a data error on the update register vi and when i try to read that offset i get a value that looks like a timer that is continually scanning. I guess i dont understand the registers :(

    Where did you get the information to set up the clusters for your vis? This is probably what would point me in the right direction.

    Thanks so much for the vis! i can tell that you have spent alot of time/work creating them. Once i get an understanding of the registry on the 1500 i feel sure communications will be a breeze :)

    QUOTE(siva @ Sep 11 2007, 01:48 AM)

    Implementation of Common industrial Protocol (CIP) via EtherNet [EtherNet/IP (CIP)]

    EtherNet_IP_PCCC

    Use these set of VIs to communicate with MicroLogix Series PLCs Via EtherNet.

    These VIs use simple TCP/IP Communication.

    Communication : Ethernet, TCP/IP

    Protocol : EtherNet/IP

    Service :CIP (For Connection Management), CIP Service for PCCC

    Command : PCCC

    Tested with : MicroLogix 1100, MicroLogix 1500,1200(with NET-ENI)

    No OPC Server Required

    No Automation Server Required

    No NI-DSC Module Required.

    Note: These VIs access N7 Integer File. To access other Files in the PLCs, just replace the "Fileno" Constant(0x07) with a Control and make it as a parameter to the SubVI.

    EtherNet_IP_CIP

    Use these set of VIs to communicate with CompactLogix, Control Logix Series PLCs, Any Device that supports CIP(EtherNet/IP)

    These VIs uses simple TCP/IP Communication.

    Communication : Ethernet, TCP/IP

    Protocol : EtherNet/IP

    Service :CIP (For Connection Management, Read, Write)

    Command : CIP Commands

    Tested with : Compact Logix Series PLCs

    No OPC Server Required

    No Automation Server Required

    No NI-DSC Module Required.

    Visit : http://www.odva.org/' target="_blank">ODVA Website for EtherNet/IP Protocol Specification

×
×
  • Create New...

Important Information

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