Initial sketch of FB setup:


Description of function blocks

Lever control:

Lever encoder FB

This function block will use the input from the installed absolute encoder to read of the position of the throttle lever. The absolute encoder will work in the range full ahead to full astern as the throttle can only be moved so far. (Aprox 140deg) This will in other words go from 100% throttle to "-100%" throttle. To make other coding easier this function block needs to convert the input from the absolute encoder to more readable 100 to -100.

Input: Encoder

Output: Encoder signal mapped inside the 100 to -100 range.


Lever movement FB

This function block will take in a signal and move the throttle to a wished direction. Ahead or astern, or in other terms move the lever "forward" or "backwards". 

 Input: Move leaver ahead

 Input: Move leaver astern

Output: Servo motor

Main lever FB

The main FB will be connected to the Lever Encoder FB, lever movement FB and the Main FB.


It will send a signal to the leaver if it should move ahead, astern or do nothing.

It will send its lever encoder signal to the main function block

It will receive position signal from the Lever Encoder FB.

It will receive a override signal and other lever position from the main function block


Logic in FB: 

It will have a function that takes a 100 to -100 signal and can control the lever position to a set position with the control ahead or astern signal to the lever movement FB.


It will always update the main FB with the lever encoder signal

If the FB receive a override signal it should take position from the other lever signal from the main FB and set the connected lever to the same position.

If the override signal is on and someone moves the lever out of its position it should automatically move back to the set position.

We will operate in a input range from full ahead to full astern. And this will be the range 100 to -100.  When the function receives a signal inside the range constraints the lever will automatically move to the given position. 


If the signal 200 is received. This means that the lever motor does not to be activated as this control panel is in control. And then we can freely move the throttle.



 Visualization:

The visualization will be a simple implementation of the control panel, and should be a basic implementation of how it is setup and looks. It needs to have all the functions as the real one. 

This will be used to test the function blocks that will be made and to debug faults and bugs in out software. 

To make it easy to connect to the different function blocks it should have its own function block so it is easy to find the right lever or button to connect to.

Rough sketch:

Input that can be connected for testing: 

Buttons:

Give

Take

Command

Request

Give warning

Light:

Warning light

Throttle:

Lever input

Encoder (Not sure how this can be implemented and used for testing)


When the testing is done and working, we can modify the visualization FB to be connected directly to the Main FB to be used as a normal control panel.




To be continued








  • No labels