PLUS+1 User Forum
PLUS+1 Tools => PLUS+1 GUIDE => Topic started by: LouisGroen on December 03, 2020, 04:21:51 PM
-
Hi everyone
I am busy with a project that requires, amongst other things, me transmitting a bunch of Boolean signals from a DP570 display to the main controller via CAN.
I have read most of the posts I could find to assist with transmitting CAN data as I am still new at this, but I cant get the application to compile.
*** ERROR 98 *** [CHPARGU2] INVALID MIX OF INPUT AND OUTPUT TYPES FOR COMPONENT: {Encode 8}
Position: module=DP570-01-00-00-00-00-XXT page=TOP!Application!DISPLAY_INPUTS x=2125000 y=1400000
*** ERROR 22 *** [CHPARGU2] ILLEGAL TYPE: {U8} ON COMPONENT: {Transmit CAN}, ENTRY A{2}
Position: module=DP570-01-00-00-00-00-XXT page=TOP!Application!DISPLAY_INPUTS x=2700000 y=2250000
Does anyone have an example of transmitting more than 8 boolean inputs over CAN?
I have attached my code if anyone can perhaps spot the issue?
Thanks
-
you can Encode boolean signal but U8,
your problem is the Encode block with U8 inputs
regards
-
after encoding you need to create an array 8, type U8, and that will go to the CAN data input, that should be all
regards
-
There used to be a CAN Tx compliance block that handled a lot of that for you, but the developers (in their great wisdom) discontinued it. I usually send it to my new customers. I have attached it here.
As stated by the others you are having data type issues. You need to be using the array operators to create an array of eight U8's. However, the attached compliance block handles that for you.
-
Also, I've attached to this post the CAN Rx compliance block.
-
Hi guys,
Thanks for the help! That makes a whole lot more sense now!
The function blocks clarify everything. Thanks Tom!
Regards,
-
Not sure if pinias' answer was quite clear but with your second encode if you were to query it and set the output to an array of u8 it would have worked.
-
a little thing:
Is there an need for a positive transmission element in front of the send input?
Becaus, it should send 1 time everey 100ms.
-
With that particular block it should be included inside the block. The description states:
" Send (Bool):
False to true transition will send the PDO.
T: Positive transition will send the PDO
F: Do not send PDO"
But yes I believe if using the basic CAN blocks that you would have to add that transition element yourself.
-
Good catch. Indeed there needs to be a positive transition aka rising edge there in front of the transmit input, or it will send every scan while that's true. The old CAN Tx compliance block I attached there does have that fortunately.
-
With that particular block it should be included inside the block. The description states:
" Send (Bool):
False to true transition will send the PDO.
T: Positive transition will send the PDO
F: Do not send PDO"
But yes I believe if using the basic CAN blocks that you would have to add that transition element yourself.
Sounds like they may have built it into that compliance block then based on that description.