12-14-2014 04:43 PM
Im working on a program attached is the code. When i try running the ramp vi code it does not work. Can someone please look at the code and help me out on possible errors. Thanks
12-14-2014 05:24 PM
@Mortiz_sac wrote:
Im working on a program attached is the code. When i try running the ramp vi code it does not work. Can someone please look at the code and help me out on possible errors. Thanks
Well, the code is a mess and you are not providing any details on what it should actually do.
In what way doesn't it work? What are typical inputs? What happens? What do you expect to happen?
12-14-2014 05:59 PM
Sorry for not explaining.
The code is a program for a composite press machine. The purpose is to run the machine automatically. The first problem im trying to figure out is why the program code is not turning on the cartridge heaters. I'm using a Daq Ni 6009 to switch on and off 2 steady state relays for the top and bottom cartidege heaters. I ran the ramp vi to try and test the heaters by setting a temp and nothing happened, was i supposed to set the temps on the global vi first before running it?
12-14-2014 10:07 PM
How important is this to you? The low quality DAQ isn't usually a good choice for control.
12-14-2014 10:18 PM
This is what i have to work with at the moment, eventually we will be using something different. At this point im trying to figure out if there are errors on the code causing the the heaters to not turn on or if i really need to use a dfferent DAQ?
12-15-2014 03:24 AM
1. Do the code activate the outputs? (check code state)
2. Do the outputs activate? (disconnect relays and measure directly, do you have pull up resistors?)
3. Is the power sufficient to activate the relays? (is the outputs dragged down when loaded?)
/Y
12-15-2014 09:04 AM
Most DAQ boards do not have enough current capacity to handle relays, even SSRs. As was previously suggested, disconnect the digital lines from the relays and measure then directly. That will tell you if your program is working correctly. Then you can get some digital buffers that can handle the current needed to control your relays.
12-15-2014 10:17 AM
Let me try to help a bit.
Your code suffers from abuse of global and locals. For example: the Start/Stop termial is unwired and the only two places you read the locals are in the same frame of one case statement! That sould prompt you to find other ways of removing the unneeded locals and globals! It is difficult to see what the dataflow really is and the right to left wires do not help you at all in that respect!
Get rid of the DAQmx assistants and use the DAQmx API. With a little peek at the Help file and the Example finder you might even find out the you can log to TDMS using "DAQmx Configure Logging.vi" and completely remove your logging loop and solve the remaining challenge of passing data between loops.
Post back with attempt #2
12-15-2014 10:41 AM
Jeff·Þ·Bohrer wrote:
you might even find out the you can log to TDMS using "DAQmx Configure Logging.vi" and completely remove your logging loop and solve the remaining challenge of passing data between loops.
That functionality is also in the DAQ Assistant (there is a Logging tab). But maybe I should take a look at the code before I make any real judgments.
12-15-2014 10:50 AM
@crossrulz wrote:
Jeff·Þ·Bohrer wrote:
you might even find out the you can log to TDMS using "DAQmx Configure Logging.vi" and completely remove your logging loop and solve the remaining challenge of passing data between loops.
That functionality is also in the DAQ Assistant (there is a Logging tab). But maybe I should take a look at the code before I make any real judgments.
Go figgure! IDNKT Thanks for that! (I'll still avoid the express vis in code though!)