cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
1,031 Views
Registered: ‎01-05-2017

Variable period timer design

Hello

 

I'm having difficulty with my timer design and its controlling computer interface. In brief, I have  a complete design performing some measurement under control of this timer and I have a GUI for start stop issues. Now I want to add a timer period on this gui. However, when I transmit the command for a related period it doesn't function properly. I'm working on this for several days and still can't understand what is this much complicated. You can find the related designs as attached and the exact chain is like,

 

GUI -> Device_Controller vhdl design (Start, Stop, Reset, Period) -> Selected Period Command -> Timer 

 

I have also questions in mind related to Reset process but at least If anyone can have a look at and point me if there is a mistake, then I can decide to search on other parts.

 

BTW, when I give exact period, no connection to GUI, system  works properly and I performed measurements using that version.

 

P.S Related python command which works for START, STOP  

def period_5sec():
port.write(str('D').encode())
print("\n Period Set as 5 Seconds")
print(str('D').encode())

 

Thanks in advance...

 

0 Kudos
3 Replies
Highlighted
Adventurer
Adventurer
986 Views
Registered: ‎01-05-2017

Re: Variable period timer design

Hello again,

 

 

When I further play with the above problem I noticed some other issues which may change the question but I didn't want to remove it since it shows the starting point.

 

The new point is Start, Stop, Reset commands changes the Period signal and this creates unstable or uncertain position. I didn't understand yet why it changes but it looks I need to do some modifications to keep Period signal. Related to this or previous post any idea is appreciated.

 

Thanks in advance ...

 

0 Kudos
Highlighted
Mentor
Mentor
975 Views
Registered: ‎02-24-2014

Re: Variable period timer design

Can you explain your hardware setup?   What board, and how it's connected to your python environment?.   I've looked at your code, and have a number of suggestions, but can't delve into it until later today.   I also have some ideas for enhancing your resolution, if that subject interests you.

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Highlighted
Adventurer
Adventurer
957 Views
Registered: ‎01-05-2017

Re: Variable period timer design

 

@jmcclusk

 

I have spartan 3AN board communicating through serial link connected to gpio ports and a serial usb converter. 

There is a python script and a GUI transmitting commands to a counter design. I want to change the counting period through my gui. I have observed that commands are going properly but after I set the one of them and transmit another one previous one are changed. However I couldn’ t achieve to understand this relation since there is no direct connection. When I checked case statement usage examples use the same signal for each case against my purpose. So I' m not processing my commands properly for now!

 

0 Kudos