Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing Ramp/Soak PID values #6

Open
matiasandina opened this issue Oct 23, 2024 · 1 comment
Open

Implementing Ramp/Soak PID values #6

matiasandina opened this issue Oct 23, 2024 · 1 comment

Comments

@matiasandina
Copy link

I am trying to see if I can recreate the PID behaviors from software using your functions.

I am not sure I understood the manual properly, but

PROPORTIONAL BANDWIDTH RAMP/SOAK ARRAY INDEX
Write Command: 82
Read Command: NA
Interpret: Acceptable values range from 0 to 7. This is the index number is used to set which PROGRAM STEP the
PROPORTIONAL BANDWIDTH RAMP/SOAK ARRAY VALUE will be written. (Reference PROGRAM STEP number in TE
Technology’s LabVIEW-based GUI, Ramp Soak programming). The index number + 1 = PROGRAM STEP number.
70. PROPORTIONAL BANDWIDTH RAMP/SOAK ARRAY VALUE
Write Command: 83
Read Command: 84
Interpret: When writing, first use the PROPORTIONALBANDWIDTH RAMP/SOAK ARRAY INDEX command to set the
index value. Then use the write command to write the PROPORTIONAL BANDWIDTH RAMP/SOAK ARRAY VALUE.
When reading, just send the index value (0 to 7) with the Read Command to receive back the value at the indexed
location.

Which I implemented with:

    def get_location_proportional(self, location):
        """Get the proportional bandwidth for a specific ramp/soak location."""
        # Set the index for the location (use command 82)
        self.send_message(self.message_builder('82', self.int_to_hex(location)), write=True)
        # Now read the proportional value at the specified index (use command 84)
        self.send_message(self.message_builder('84'))
        return self.response_to_int(self.read_message()) / 100  # Convert and scale
        
    def set_location_proportional(self, location, bandwidth):
        """Set the proportional bandwidth for a specific ramp/soak location."""
        # Set the index for the location (use command 82)
        self.send_message(self.message_builder('82', self.int_to_hex(location)), write = True)
        # Now write the proportional value at the specified index (use command 83)
        hex_value = self.int_to_hex(int(bandwidth * 100))
        self.send_message(self.message_builder('83', hex_value), write=True)

I added some print statements to send_message() to try to see what the actual messages sent/received are. The controller seems to acknowledge indexing and change of temps, but not really changing it. I would appreciate any pointers and help. I am happy to contribute these developments to the code base

>>> set_location_proportional(controller, 1, 10)
Sending message: *8200012b
Controller's response was
b'*0001c1^'
Sending message: *8303e86b
Controller's response was
b'*03e800^'
>>> controller.get_location_proportional(1,)
Sending message: *8200012b
Controller's response was
b'*0001c1^'
Sending message: *8400002c
3.0
@matiasandina
Copy link
Author

I think I have implemented a working function with added PID controls for ramp/soak mode
I am happy to integrate it with yours if you are willing

https://github.com/matiasandina/phdutils/tree/main/tc720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant