Sending ASCI Text by CAN

Phil Gooch

Posted on 20.05.2020 12:44

Is there a method of converting a text string to ASCI and sending/recieving by CAN in Dewesoft?



Eva Kalšek
Customer Support Engineer
Posted on 20.05.2020 14:56

Dear Phill,


we would need some additional information.


How is your "String" channel defined? So if the string messages are known you can predefined a discrete display widget. In the widget you can define a specific value to specific string. So the CAN channel can not read an actual string value but only a float or integer value.


I think that this is the only solution to implement "String" values to CAN channels.


Regards

Phil Gooch

Posted on 21.05.2020 01:29

Hi Eva.


I would like the user to enter the text in a dialog box as part of a sequence (I have not started to develop the sequence yet as I'm not sure if the goal is possible). Upon trigger, the message will then be sent to a third party system by CAN which, will display the text based on the message. Unfortunatly, for added complexity, the recieving system needs the text to be sent in reverse order!


If we use the word DEWESOFT for an example:


We can use this website to convert each letter in the word DEWESOFT from ASCII to decimal


D = 68

E = 69

W = 87

E = 69

S = 83

O = 79

F = 70

T = 84


We can then configure the Message in Dewesoft, individually setting each channel to the decimal value above - In reverse order


Bit 0-7 = 84

Bit 8-15 = 70

Bit 16-23 = 79

etc.


Once this is done, we send the whole message to the recieving device and it displays the word DEWESOFT


Does Dewesoft have a equivalents to Excel functions =BIN2HEX() and =CHAR() and =CODE() ?



DEWESoft Support
Technical support
Posted on 22.05.2020 11:51

Dear Phill,


if the string values are not predefined, so that they are random, unfortunately this is not possible. For your example if you can define the values for the "Dewesoft" word into the Discrete display widget would be the best solution.


You can select what Data type is displayed for a channel and also the Digital meter have some additional Display values. See the attached pictures.


Regards,



Attached files:
Phil Gooch

Posted on 12.06.2020 08:47

COming back to the last question in my earlier post that I dont think has been answered, does Dewesoft have a equivalents to Excel functions =BIN2HEX() and =CHAR() and =CODE() ?


If not, what is your suggested method to convert decimal values to ASCII within Dewesoft?

Primoz Lapi
Customer Support Engineer
Posted on 12.06.2020 16:38

Hi,


we have this option in tabular values display which can transfer decimal number into ASCII format.

Login to reply to this topic. If you don't have account yet, you can signup for free account .