Jump to content

Thang Nguyen 2

Members
  • Posts

    5
  • Joined

  • Last visited

LabVIEW Information

  • Version
    LabVIEW 8.6
  • Since
    2006

Thang Nguyen 2's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I posted this queston on NI forum but I still not get any asnwer for it, so I hope I can get help here. I need to finish this project soon. I am working on a project which require both measure and generate PWM signals. Currently I have some issues with both of these. I use PXI NI 6624 card. 1. Issue with measure PWM. I connect the signal to Gate + and GND to Gate -. I expect I can read the width of the high pulse, casue the gate will start the counter. I use the code as in example of measure the duty cycle (in picture 1). The problem I have is the values in the array also include the low pulse, and these two values will be shifted countinously in the array. So if I index from the array I cannot get a stable number (in picture 2). Ex: 1. 2-5-2-5 <----- 2. 5-2-5-2 <----- 3. 2-5-2-5 <----- I want to know the reason and how to fix it. 2. Issue with generate PWM. I use another counter to generate the PWM. I connect Vdd and Vss with a 13.8V DC Power Supply. I use a 10 KOhm resister connect between Vss and Out. I got a right signal with 13.8 V. a> My first problem is the frequency is not stable. I set it to 122 Hz, and I saw it jump from 119Hz to 125Hz. b> My second problem is when I connect this to the measure PWM I did above the voltage will down to 2.5 V. I tried with 1 KOhm resister and it downs to 6V. When I connect a real controller with a 12V PWM, this signal is stable after I connect with measure PWM channel above. I would like to know if I did anything wrong. Cause this PWM will be use to simulate a sensor value and it must be stable. I highly appreciate reading and answering my questions. Best regards, Thang Nguyen
  2. I just remove all of the acquire semaphore and release semaphore VI in my response message VIs and it works now. It's kind of the random response create the traffic jam. But I still not understand why this happen here. Isn't it right that there should be one can acquire the semaphore?
  3. I use unlock semaphore to release the semaphore after it finish sending out message. I have a flag to control whether the system reponse the request message or not. In that case, my processtransmit.vi runs really well. I did use this same architecture for my another project and it runs smoothly for almost a year now. The only different is in the response VI, I don't use release semaphore VI. Then I thought that I should use semaphore to keep them in the same fashion. Then now it stucks. I didn't use time out because I want to keep my message send out at the right interval time, cause this software interacts with another realtime system. If it miss one loop the system will go to false state. I did check that the response VI does work for couple of seconds and then all of them get stuck. Thank for your concerns. @Crossrulz: I think maybe I should try this. But is it waste when NI create all of these semaphore VIs?
  4. Hi, after couple months not using Lavag, I am really supprise with the new interface. It looks need but I still like the old one when you can see all of new topic and new update message. But one trouble thing for me is I cannot access to my all account anymore. I tried with all stuffs like security questions which I belive I answer them right but it turn out a wrong answer. Is there anyone should I contact with to ask for help about this? My account is Thang Nguyen. Best regards, Thang Nguyen
  5. First of all I have to say that I posted this question on NI forum, but I still don't have a solution yet, so I hope you can help me. I have a case with semaphore vis getting stuck (deadlock) waiting for each other. In my program, I have 2 dynamic VIs. The first one, called processtransmit.vi, sends continously messages to CAN at different rate. So I used parallel time-loops with different interval times. Each of these loops has a semaphore to guarantie that there is only one loop can call send data function to send message to CAN at a time. The second one, called processreceive.vi, receives messages from CAN. If there is a request message it will send back some asynchronous message. Cause it also using send CAN function so I also use semaphore. After runing for couple of seconds, all of these semaphores get stuck. I did try turn on the hight light function both before and after it gets stuck but I still not understand why this happens. I attach here 2 pictures, one is processtransmit.vi, another one is responsemessage.vi which is call from processreceive.vi. You can see the waiting green arror on the acquire semaphore VI. The response VI will be send out base on the request message. I would appreciate any helps or suggestion of another architect which make it runs better. Best regards, Thang Nguyen
×
×
  • Create New...

Important Information

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